local-mcp 3.0.171 → 3.0.172

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 +16 -7
  2. package/package.json +1 -1
package/download.js CHANGED
@@ -12,6 +12,15 @@ const path = require('path')
12
12
  const os = require('os')
13
13
  const { execFileSync, execSync } = require('child_process')
14
14
 
15
+ // On Windows, Git-Bash's tar interprets "C:\..." paths as "host:path" (SSH syntax).
16
+ // Use the native Windows tar.exe from System32 instead, which handles Win32 paths correctly.
17
+ function extractTar(tarPath, destDir) {
18
+ const tarBin = process.platform === 'win32'
19
+ ? path.join(process.env.SystemRoot || 'C:\\Windows', 'System32', 'tar.exe')
20
+ : 'tar'
21
+ execFileSync(tarBin, ['-xzf', tarPath, '-C', destDir], { stdio: 'pipe' })
22
+ }
23
+
15
24
  const BACKEND_URL = 'https://office-mcp-production.up.railway.app'
16
25
 
17
26
  // Platform-aware cache directory:
@@ -181,7 +190,7 @@ async function ensureBinary() {
181
190
  try {
182
191
  await downloadFile(url, tarPath)
183
192
  process.stderr.write(` Extracting...\n`)
184
- execFileSync('tar', ['-xzf', tarPath, '-C', CACHE_DIR], { stdio: 'pipe' })
193
+ extractTar(tarPath, CACHE_DIR)
185
194
  fs.unlinkSync(tarPath)
186
195
  } catch (err) {
187
196
  // Go binary not yet published for this version — fall back to message
@@ -222,7 +231,7 @@ async function ensureBinary() {
222
231
  await downloadFile(url, tarPath)
223
232
 
224
233
  process.stderr.write(` Extrayendo...\n`)
225
- execFileSync('tar', ['-xzf', tarPath, '-C', versionDir], { stdio: 'pipe' })
234
+ extractTar(tarPath, versionDir)
226
235
  fs.unlinkSync(tarPath)
227
236
 
228
237
  if (!fs.existsSync(binPath)) {
@@ -282,7 +291,7 @@ async function ensureTeamsProxy() {
282
291
  const stat = fs.statSync(tarPath)
283
292
  if (stat.size < 1000) { fs.unlinkSync(tarPath); throw new Error(`Descarga incompleta (${stat.size} bytes)`) }
284
293
 
285
- execFileSync('tar', ['-xzf', tarPath, '-C', CACHE_DIR], { stdio: 'pipe' })
294
+ extractTar(tarPath, CACHE_DIR)
286
295
  fs.unlinkSync(tarPath)
287
296
 
288
297
  if (!fs.existsSync(binPath)) throw new Error('teams-proxy no encontrado tras extraer')
@@ -362,7 +371,7 @@ async function ensureTray() {
362
371
  fs.mkdirSync(userAppsDir, { recursive: true })
363
372
 
364
373
  process.stderr.write(` Instalando tray en ~/Applications...\n`)
365
- execFileSync('tar', ['-xzf', tarPath, '-C', userAppsDir], { stdio: 'pipe' })
374
+ extractTar(tarPath, userAppsDir)
366
375
  fs.unlinkSync(tarPath)
367
376
 
368
377
  if (!fs.existsSync(trayApp)) {
@@ -446,7 +455,7 @@ async function ensureSlackProxy() {
446
455
  const stat = fs.statSync(tarPath)
447
456
  if (stat.size < 1000) { fs.unlinkSync(tarPath); throw new Error(`Incomplete download (${stat.size} bytes)`) }
448
457
 
449
- execFileSync('tar', ['-xzf', tarPath, '-C', CACHE_DIR], { stdio: 'pipe' })
458
+ extractTar(tarPath, CACHE_DIR)
450
459
  fs.unlinkSync(tarPath)
451
460
 
452
461
  if (!fs.existsSync(binPath)) throw new Error('slack-proxy not found after extraction')
@@ -495,7 +504,7 @@ async function ensureHelper() {
495
504
  const stat = fs.statSync(tarPath)
496
505
  if (stat.size < 1000) { fs.unlinkSync(tarPath); throw new Error(`Incomplete download (${stat.size} bytes)`) }
497
506
 
498
- execFileSync('tar', ['-xzf', tarPath, '-C', CACHE_DIR], { stdio: 'pipe' })
507
+ extractTar(tarPath, CACHE_DIR)
499
508
  fs.unlinkSync(tarPath)
500
509
 
501
510
  if (!fs.existsSync(binPath)) throw new Error('local-mcp-helper not found after extraction')
@@ -543,7 +552,7 @@ async function ensureJXARunner() {
543
552
  const stat = fs.statSync(tarPath)
544
553
  if (stat.size < 1000) { fs.unlinkSync(tarPath); throw new Error(`Incomplete download (${stat.size} bytes)`) }
545
554
 
546
- execFileSync('tar', ['-xzf', tarPath, '-C', CACHE_DIR], { stdio: 'pipe' })
555
+ extractTar(tarPath, CACHE_DIR)
547
556
  fs.unlinkSync(tarPath)
548
557
 
549
558
  if (!fs.existsSync(binPath)) throw new Error('local-mcp-jxa-runner not found after extraction')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "local-mcp",
3
- "version": "3.0.171",
3
+ "version": "3.0.172",
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": {