local-mcp 3.0.148 → 3.0.149
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 +4 -2
- package/package.json +1 -1
- package/setup.js +2 -1
package/download.js
CHANGED
|
@@ -45,7 +45,7 @@ function _getMachineId() {
|
|
|
45
45
|
try {
|
|
46
46
|
const ioreg = execSync('ioreg -rd1 -c IOPlatformExpertDevice', { stdio: 'pipe' }).toString()
|
|
47
47
|
const match = ioreg.match(/"IOPlatformUUID"\s*=\s*"([^"]+)"/)
|
|
48
|
-
|
|
48
|
+
if (match) return match[1]
|
|
49
49
|
} catch {}
|
|
50
50
|
} else if (process.platform === 'win32') {
|
|
51
51
|
try {
|
|
@@ -59,7 +59,9 @@ function _getMachineId() {
|
|
|
59
59
|
if (mid) return mid
|
|
60
60
|
} catch {}
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
// Fallback: hash hostname instead of sending raw PII
|
|
63
|
+
const crypto = require('crypto')
|
|
64
|
+
return crypto.createHash('sha256').update(os.hostname()).digest('hex').slice(0, 16)
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
function getArch() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "local-mcp",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.149",
|
|
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
|
@@ -749,7 +749,8 @@ function _getMachineId() {
|
|
|
749
749
|
// Generate from hardware UUID (full UUID, same format as Swift server)
|
|
750
750
|
const ioreg = execSync('ioreg -rd1 -c IOPlatformExpertDevice', { stdio: 'pipe' }).toString()
|
|
751
751
|
const match = ioreg.match(/"IOPlatformUUID"\s*=\s*"([^"]+)"/)
|
|
752
|
-
|
|
752
|
+
if (!match) return '' // No hostname fallback — avoid PII leak
|
|
753
|
+
const id = match[1]
|
|
753
754
|
// Save to Keychain for Swift server to read
|
|
754
755
|
try { execSync(`security add-generic-password -s com.local-mcp.machine-id -a machine-id -w "${id}" -U 2>/dev/null`, { stdio: 'pipe' }) } catch {}
|
|
755
756
|
return id
|