local-mcp 3.0.128 → 3.0.130

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 +1 -1
  2. package/package.json +1 -1
  3. package/setup.js +14 -9
package/download.js CHANGED
@@ -129,7 +129,7 @@ async function ensureBinary() {
129
129
 
130
130
  // Ya está en cache
131
131
  if (fs.existsSync(binPath)) {
132
- return { binPath, versionDir }
132
+ return { binPath, versionDir, version }
133
133
  }
134
134
 
135
135
  process.stderr.write(`\nLMCP v${version} no encontrado en cache.\n`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "local-mcp",
3
- "version": "3.0.128",
3
+ "version": "3.0.130",
4
4
  "description": "LMCP — 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
@@ -144,7 +144,7 @@ async function runSetup(opts = {}) {
144
144
  try {
145
145
  const { ensureBinary, CACHE_DIR } = require('./download')
146
146
  process.stderr.write('Downloading LMCP runtime...\n')
147
- const { binPath } = await ensureBinary()
147
+ const { binPath, version: binaryVersion } = await ensureBinary()
148
148
  // Copy binary to stable path (npx fast-path will exec it directly)
149
149
  const stablePath = path.join(CACHE_DIR, 'local-mcp-server')
150
150
  try {
@@ -165,9 +165,11 @@ async function runSetup(opts = {}) {
165
165
  }
166
166
  } catch { /* stablePath doesn't exist — nothing to do */ }
167
167
  fs.renameSync(tmpPath, stablePath)
168
- // Write version file so fast path knows when to update
169
- const pkg = require('./package.json')
170
- fs.writeFileSync(path.join(CACHE_DIR, '.server-version'), pkg.version)
168
+ // Write the actual binary version (from /runtime/latest), not the npm package
169
+ // version. npm and Swift binary versions can diverge (npm-only fixes bump npm
170
+ // without a Swift rebuild). Writing pkg.version here caused the tray to think
171
+ // a newer binary was on disk and restart-loop (LMC-TODO).
172
+ fs.writeFileSync(path.join(CACHE_DIR, '.server-version'), binaryVersion || '')
171
173
  const settingsSrc = path.join(path.dirname(binPath), 'settings.html')
172
174
  const settingsDst = path.join(CACHE_DIR, 'settings.html')
173
175
  if (fs.existsSync(settingsSrc)) fs.copyFileSync(settingsSrc, settingsDst)
@@ -393,7 +395,7 @@ async function runSetup(opts = {}) {
393
395
 
394
396
  // LMCP_METHOD lets install.sh pass 'curl' so we can distinguish it from
395
397
  // a direct 'npx local-mcp setup' invocation in the analytics.
396
- _pingInstall(configured, process.env.LMCP_METHOD || opts.method || 'npx-setup', email)
398
+ _pingInstall(configured, process.env.LMCP_METHOD || opts.method || 'npx-setup', email, binaryVersion)
397
399
  }
398
400
 
399
401
  async function _installTeamsProxy() {
@@ -558,13 +560,16 @@ function _trackEmailPrompt(result) {
558
560
  } catch { /* non-fatal */ }
559
561
  }
560
562
 
561
- function _pingInstall(clients, method, email = '') {
563
+ function _pingInstall(clients, method, email = '', binaryVersion = '') {
562
564
  try {
563
565
  const https = require('https')
564
566
  const pkg = require('./package.json')
565
567
  const machineId = _getMachineId()
568
+ // Use the actual binary version (from /runtime/latest) so the admin panel
569
+ // shows the Swift server version, not the npm package version. npm and Swift
570
+ // versions can diverge when npm-only fixes are released.
566
571
  const data = JSON.stringify({
567
- version: pkg.version,
572
+ version: binaryVersion || pkg.version,
568
573
  os_version: require('os').release(),
569
574
  arch: process.arch,
570
575
  node_version: process.version,
@@ -591,7 +596,7 @@ function _pingInstall(clients, method, email = '') {
591
596
  if (preToken && preToken.startsWith('lmcp-pre-')) {
592
597
  const pingData = JSON.stringify({
593
598
  pre_token: preToken,
594
- version: pkg.version,
599
+ version: binaryVersion || pkg.version,
595
600
  os_version: require('os').release(),
596
601
  })
597
602
  const pingReq = https.request({
@@ -610,7 +615,7 @@ function _pingInstall(clients, method, email = '') {
610
615
  // Even if the user doesn't restart their AI client right away
611
616
  const hb = JSON.stringify({
612
617
  machine_id: machineId,
613
- version: pkg.version,
618
+ version: binaryVersion || pkg.version,
614
619
  os_version: require('os').release(),
615
620
  arch: process.arch,
616
621
  transport: 'stdio',