local-mcp 3.0.409 → 3.0.411
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/package.json +1 -1
- package/setup.js +16 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "local-mcp",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.411",
|
|
4
4
|
"description": "Let ChatGPT, Claude, Cursor & any MCP client actually use your Mac — read & reply to email, manage your calendar, text over iMessage, find files, work with Teams, Slack & Office. On your Mac, no API keys, free.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
package/setup.js
CHANGED
|
@@ -836,6 +836,20 @@ async function _associateEmail(email, token) {
|
|
|
836
836
|
})
|
|
837
837
|
}
|
|
838
838
|
|
|
839
|
+
// Where install-ref is persisted for the LONG-RUNNING process to read back on every
|
|
840
|
+
// heartbeat. NOT the same directory on every platform: Mac's Swift heartbeat
|
|
841
|
+
// (HeartbeatManager.swift installRef) reads ~/.local/share/local-mcp/install-ref, no
|
|
842
|
+
// /bin — go-server's config.InstallRef() (Windows AND Linux) reads
|
|
843
|
+
// <cache dir>/install-ref WITH /bin, via config.Dir(), which is the exact directory
|
|
844
|
+
// download.js's CACHE_DIR already computes per platform. Measured live on Windows
|
|
845
|
+
// 2026-09-18: this used to hardcode the darwin-shaped path unconditionally, so a
|
|
846
|
+
// Windows (or Linux) npm/npx install persisted its ref where nothing ever read it
|
|
847
|
+
// back — resolveInstallRef's file/env/ADS ladder never even looked there.
|
|
848
|
+
function _installRefDir(platform = process.platform, home = HOME, cacheDir = download.CACHE_DIR) {
|
|
849
|
+
if (platform === 'darwin') return path.join(home, '.local', 'share', 'local-mcp')
|
|
850
|
+
return cacheDir
|
|
851
|
+
}
|
|
852
|
+
|
|
839
853
|
// On darwin the anon cloud_token is persisted in config.json (cfgFile), which the Swift
|
|
840
854
|
// tray already reads. Off darwin, the go-server reads it EXCLUSIVELY from
|
|
841
855
|
// getCacheDir()/.cloud-token as a plain trimmed string (tunnel.go:454,513-523) — it never
|
|
@@ -1022,7 +1036,7 @@ function _pingInstall(clients, method, email = '', binaryVersion = '') {
|
|
|
1022
1036
|
// machine_id + ref in one event (machine-level attribution, deduped, and it
|
|
1023
1037
|
// closes install events that fire before machine_id exists). Best-effort.
|
|
1024
1038
|
try {
|
|
1025
|
-
const _refDir =
|
|
1039
|
+
const _refDir = _installRefDir()
|
|
1026
1040
|
fs.mkdirSync(_refDir, { recursive: true })
|
|
1027
1041
|
fs.writeFileSync(path.join(_refDir, 'install-ref'), _getRef())
|
|
1028
1042
|
} catch {}
|
|
@@ -1172,7 +1186,7 @@ module.exports = {
|
|
|
1172
1186
|
CLIENTS_REPORT_SCHEMA,
|
|
1173
1187
|
_notSupportedOnPlatformResult,
|
|
1174
1188
|
_launcherSpawnSpec, _writeLaunchScript, _writeLaunchSpec,
|
|
1175
|
-
_getMachineId, _healthCheckSpec, _localMcpConfigDir,
|
|
1189
|
+
_getMachineId, _healthCheckSpec, _localMcpConfigDir, _installRefDir,
|
|
1176
1190
|
_cloudTokenPath, _readCachedCloudToken, _writeCloudToken, _registerAnonToken,
|
|
1177
1191
|
_autoLaunchClient, _fetchClientsCatalog,
|
|
1178
1192
|
}
|