local-mcp 3.0.418 → 3.0.419
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/index.js +24 -0
- package/launch-event.js +5 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -231,6 +231,25 @@ function writeUninstallSentinels() {
|
|
|
231
231
|
}
|
|
232
232
|
function clearUninstallSentinels() {
|
|
233
233
|
for (const p of uninstallSentinelPaths()) { try { fs.unlinkSync(p) } catch {} }
|
|
234
|
+
try { fs.unlinkSync(avisoDesinstaladoPath()) } catch {}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// Marcador de espera (#48): tras una desinstalación el cliente de IA relanza el wrapper sin pausa
|
|
238
|
+
// (703 lanzamientos `uninstalled` en 24 h desde 14 máquinas). El primero dentro de la ventana avisa
|
|
239
|
+
// y reporta; los siguientes salen en silencio, sin evento ni mensaje. Un reinstalar limpia el marcador.
|
|
240
|
+
const VENTANA_AVISO_DESINSTALADO_MS = 30 * 60 * 1000
|
|
241
|
+
function avisoDesinstaladoPath() {
|
|
242
|
+
return path.join(path.dirname(require('./download').CACHE_DIR), '.uninstalled-aviso')
|
|
243
|
+
}
|
|
244
|
+
function avisoDesinstaladoVigente() {
|
|
245
|
+
try {
|
|
246
|
+
const t = fs.statSync(avisoDesinstaladoPath()).mtimeMs
|
|
247
|
+
return Date.now() - t >= 0 && Date.now() - t < VENTANA_AVISO_DESINSTALADO_MS
|
|
248
|
+
} catch { return false }
|
|
249
|
+
}
|
|
250
|
+
function marcarAvisoDesinstalado() {
|
|
251
|
+
try { fs.mkdirSync(path.dirname(avisoDesinstaladoPath()), { recursive: true }) } catch {}
|
|
252
|
+
try { fs.writeFileSync(avisoDesinstaladoPath(), String(Date.now())) } catch {}
|
|
234
253
|
}
|
|
235
254
|
|
|
236
255
|
const cmd = process.argv[2]
|
|
@@ -425,6 +444,11 @@ async function main() {
|
|
|
425
444
|
// runtime-dir and durable App Support copies (see uninstallSentinelPaths).
|
|
426
445
|
{
|
|
427
446
|
if (anyUninstallSentinel()) {
|
|
447
|
+
if (avisoDesinstaladoVigente()) {
|
|
448
|
+
evento.silenciar()
|
|
449
|
+
process.exit(0)
|
|
450
|
+
}
|
|
451
|
+
marcarAvisoDesinstalado()
|
|
428
452
|
reportarLanzamiento('uninstalled')
|
|
429
453
|
process.stderr.write(
|
|
430
454
|
'[LMCP] Local MCP was uninstalled — not starting.\n' +
|
package/launch-event.js
CHANGED
|
@@ -166,6 +166,10 @@ function reportar (outcome, clase, { enProceso = false } = {}) {
|
|
|
166
166
|
} catch {}
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
+
// Un lanzamiento que el wrapper decide no reportar (#48: ya avisó dentro de la ventana) se marca
|
|
170
|
+
// como reportado para que la red del `exit` tampoco lo mande como `other`.
|
|
171
|
+
function silenciar () { reportado = true }
|
|
172
|
+
|
|
169
173
|
function lanzarSuelto (outcome, clase) {
|
|
170
174
|
const hijo = cp.spawn(process.execPath, [__filename, outcome, clase],
|
|
171
175
|
{ detached: true, stdio: 'ignore', windowsHide: true })
|
|
@@ -190,5 +194,5 @@ if (require.main === module) {
|
|
|
190
194
|
if (c) enviar(c)
|
|
191
195
|
}
|
|
192
196
|
|
|
193
|
-
module.exports = { PLATAFORMAS, CLASES, OUTCOMES, RE_VERSION, RE_MAQUINA, TOPE_ID_MS, claseDeArgumento, apagado, cuerpo, reportar, soltarPendiente,
|
|
197
|
+
module.exports = { PLATAFORMAS, CLASES, OUTCOMES, RE_VERSION, RE_MAQUINA, TOPE_ID_MS, claseDeArgumento, apagado, cuerpo, reportar, silenciar, soltarPendiente,
|
|
194
198
|
_idDeHardwareWindows: idDeHardwareWindows } // costura de test
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "local-mcp",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.419",
|
|
4
4
|
"description": "Let ChatGPT, Claude, Cursor & any MCP client actually use your Mac or Windows PC — read & reply to email, manage your calendar, text over iMessage, find files, work with Teams, Slack & Office. Runs locally, no API keys, free.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|