local-mcp 3.0.128 → 3.0.129

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 +6 -4
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.129",
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)