From 16287e175d8efb58445de7c74332181427e4b777 Mon Sep 17 00:00:00 2001 From: developer Date: Fri, 27 Nov 2026 14:42:02 +0800 Subject: [PATCH] chore(codex): publish the Codex plugin 0.7.14 Syncs plugins/everme with the 0.7.14 release (the npm packages are already published): - A broken or altered memory route now sends requests to a closed address, so they fail instead of reaching any local service. - When the account keeps its memory on a Mac that EverMe cannot reach, the refusal names that Mac and says EverMe is closed there or the Mac is offline. Co-Authored-By: Claude Opus 5.5 --- plugins/everme/.codex-plugin/plugin.json | 2 +- plugins/everme/bin/hook.mjs | 31 ++++++++++++++++-------- plugins/everme/bin/memory-mcp.mjs | 31 ++++++++++++++++-------- 3 files changed, 43 insertions(+), 21 deletions(-) diff --git a/plugins/everme/.codex-plugin/plugin.json b/plugins/everme/.codex-plugin/plugin.json index 0bc8920..6a8035f 100644 --- a/plugins/everme/.codex-plugin/plugin.json +++ b/plugins/everme/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "everme", - "version": "0.7.13", + "version": "0.7.14", "description": "Persistent memory recall and lifecycle capture for Codex sessions via EverMe.", "author": { "name": "EverMind AI", diff --git a/plugins/everme/bin/hook.mjs b/plugins/everme/bin/hook.mjs index 9ab2bfb..88b1fb6 100755 --- a/plugins/everme/bin/hook.mjs +++ b/plugins/everme/bin/hook.mjs @@ -81,7 +81,7 @@ function brandStrings(value, brand) { // ../agent-sdk/src/config.js var DEFAULT_API_BASE = "https://api.everme.evermind.ai"; var API_PATH_PREFIX = "/api/v1"; -var DEFAULT_LOCAL_GATEWAY = "http://127.0.0.1:18790"; +var CLOSED_GATEWAY = "http://127.0.0.1:0"; var LOOPBACK_HOSTS = /* @__PURE__ */ new Set(["127.0.0.1", "localhost", "[::1]"]); var TIMEOUT_MS = 3e4; function resolveConfig(host = {}) { @@ -125,19 +125,19 @@ function readDeviceRoute(env = process.env) { raw = readFileSync(join(home, "route.json"), "utf8"); } catch (err) { if (err?.code === "ENOENT" || err?.code === "ENOTDIR") return null; - return { baseUrl: DEFAULT_LOCAL_GATEWAY + API_PATH_PREFIX }; + return { baseUrl: CLOSED_GATEWAY + API_PATH_PREFIX }; } let route; try { route = JSON.parse(raw); } catch { - return { baseUrl: DEFAULT_LOCAL_GATEWAY + API_PATH_PREFIX }; + return { baseUrl: CLOSED_GATEWAY + API_PATH_PREFIX }; } if (!route || typeof route !== "object" || Array.isArray(route)) { - return { baseUrl: DEFAULT_LOCAL_GATEWAY + API_PATH_PREFIX }; + return { baseUrl: CLOSED_GATEWAY + API_PATH_PREFIX }; } if (route.mode !== "local") return null; - const apiBase = isLoopbackBase(route.apiBase) ? trimSlash(route.apiBase) : DEFAULT_LOCAL_GATEWAY; + const apiBase = isLoopbackBase(route.apiBase) ? trimSlash(route.apiBase) : CLOSED_GATEWAY; const floor = route.injectMinScore; return { baseUrl: apiBase + API_PATH_PREFIX, @@ -219,8 +219,19 @@ function boundedDiagnostic(value, maxChars = 240) { var MEMORY_ROUTE_HEADER = "X-EverMe-Memory-Route"; var MEMORY_STORED_ON_DEVICE = 42501; function storedOnDeviceMessage(deviceName) { - const name = typeof deviceName === "string" && deviceName.trim() ? deviceName.trim() : "another device"; - return `This account keeps its memory on “${name}”, so EverMe refuses memory from this computer. Switch it back to the cloud on that Mac (or on the web, if that Mac is gone) to save memory from here.`; + return `This account keeps its memory on “${deviceLabel(deviceName)}”, so EverMe refuses memory from this computer. Switch it back to the cloud on that Mac (or on the web, if that Mac is gone) to save memory from here.`; +} +var MEMORY_DEVICE_UNREACHABLE = 42510; +function deviceUnreachableMessage(deviceName) { + return `This account keeps its memory on “${deviceLabel(deviceName)}”, which EverMe cannot reach now (EverMe is closed there, or that Mac is offline), so this memory was not saved.`; +} +function deviceLabel(deviceName) { + return typeof deviceName === "string" && deviceName.trim() ? deviceName.trim() : "another device"; +} +function refusalMessage(code, env) { + if (code === MEMORY_STORED_ON_DEVICE) return storedOnDeviceMessage(env?.result?.deviceName); + if (code === MEMORY_DEVICE_UNREACHABLE) return deviceUnreachableMessage(env?.result?.deviceName); + return ""; } var EvermeError = class extends Error { constructor({ message, status = 0, code = 0, requestId = "", type = "upstream" }) { @@ -288,7 +299,7 @@ function createClient(cfg, log = noop) { return await execWithRetry(url, init, boundedTimeoutMs(timeoutMs, cfg.deadlineAt), log, requestId); } catch (err) { if (route && err instanceof EvermeError && err.type === "upstream" && !err.httpStatus) { - const fix = cfg.brand === "everos" ? "run `evercli doctor`" : "open EverMe Desktop"; + const fix = cfg.brand === "everos" ? "run `evercli doctor`" : "open EverMe Desktop or run `evercli memory status`"; err.message = boundedDiagnostic( `local memory service is not reachable (${err.message}); ${fix}`, 240 @@ -429,7 +440,7 @@ async function execOnce(url, init, timeoutMs, requestId = "") { const code = Number(env?.status) || 0; const errType = code >= 3e4 && code < 30300 && code !== 30104 ? "auth" : "upstream"; throw new EvermeError({ - message: code === MEMORY_STORED_ON_DEVICE ? storedOnDeviceMessage(env?.result?.deviceName) : env?.error || `HTTP ${res.status}`, + message: refusalMessage(code, env) || env?.error || `HTTP ${res.status}`, status: res.status, code, requestId: env?.requestId || requestId, @@ -3084,7 +3095,7 @@ function stringValue(value) { } // src/adapter.js -var PKG_VERSION = true ? "0.7.13" : createRequire(import.meta.url)("../package.json").version; +var PKG_VERSION = true ? "0.7.14" : createRequire(import.meta.url)("../package.json").version; var CONTEXT_EVENTS = /* @__PURE__ */ new Set(["SessionStart", "UserPromptSubmit"]); var codexAdapter = { platform: "codex", diff --git a/plugins/everme/bin/memory-mcp.mjs b/plugins/everme/bin/memory-mcp.mjs index 28c7d4c..a3dd845 100755 --- a/plugins/everme/bin/memory-mcp.mjs +++ b/plugins/everme/bin/memory-mcp.mjs @@ -17114,7 +17114,7 @@ function brandStrings(value, brand) { // ../agent-sdk/src/config.js var DEFAULT_API_BASE = "https://api.everme.evermind.ai"; var API_PATH_PREFIX = "/api/v1"; -var DEFAULT_LOCAL_GATEWAY = "http://127.0.0.1:18790"; +var CLOSED_GATEWAY = "http://127.0.0.1:0"; var LOOPBACK_HOSTS = /* @__PURE__ */ new Set(["127.0.0.1", "localhost", "[::1]"]); var TIMEOUT_MS = 3e4; function resolveConfig(host = {}) { @@ -17168,19 +17168,19 @@ function readDeviceRoute(env = process.env) { raw = readFileSync(join(home, "route.json"), "utf8"); } catch (err) { if (err?.code === "ENOENT" || err?.code === "ENOTDIR") return null; - return { baseUrl: DEFAULT_LOCAL_GATEWAY + API_PATH_PREFIX }; + return { baseUrl: CLOSED_GATEWAY + API_PATH_PREFIX }; } let route; try { route = JSON.parse(raw); } catch { - return { baseUrl: DEFAULT_LOCAL_GATEWAY + API_PATH_PREFIX }; + return { baseUrl: CLOSED_GATEWAY + API_PATH_PREFIX }; } if (!route || typeof route !== "object" || Array.isArray(route)) { - return { baseUrl: DEFAULT_LOCAL_GATEWAY + API_PATH_PREFIX }; + return { baseUrl: CLOSED_GATEWAY + API_PATH_PREFIX }; } if (route.mode !== "local") return null; - const apiBase = isLoopbackBase(route.apiBase) ? trimSlash(route.apiBase) : DEFAULT_LOCAL_GATEWAY; + const apiBase = isLoopbackBase(route.apiBase) ? trimSlash(route.apiBase) : CLOSED_GATEWAY; const floor = route.injectMinScore; return { baseUrl: apiBase + API_PATH_PREFIX, @@ -17236,8 +17236,19 @@ function boundedDiagnostic(value, maxChars = 240) { var MEMORY_ROUTE_HEADER = "X-EverMe-Memory-Route"; var MEMORY_STORED_ON_DEVICE = 42501; function storedOnDeviceMessage(deviceName) { - const name = typeof deviceName === "string" && deviceName.trim() ? deviceName.trim() : "another device"; - return `This account keeps its memory on “${name}”, so EverMe refuses memory from this computer. Switch it back to the cloud on that Mac (or on the web, if that Mac is gone) to save memory from here.`; + return `This account keeps its memory on “${deviceLabel(deviceName)}”, so EverMe refuses memory from this computer. Switch it back to the cloud on that Mac (or on the web, if that Mac is gone) to save memory from here.`; +} +var MEMORY_DEVICE_UNREACHABLE = 42510; +function deviceUnreachableMessage(deviceName) { + return `This account keeps its memory on “${deviceLabel(deviceName)}”, which EverMe cannot reach now (EverMe is closed there, or that Mac is offline), so this memory was not saved.`; +} +function deviceLabel(deviceName) { + return typeof deviceName === "string" && deviceName.trim() ? deviceName.trim() : "another device"; +} +function refusalMessage(code, env) { + if (code === MEMORY_STORED_ON_DEVICE) return storedOnDeviceMessage(env?.result?.deviceName); + if (code === MEMORY_DEVICE_UNREACHABLE) return deviceUnreachableMessage(env?.result?.deviceName); + return ""; } var EvermeError = class extends Error { constructor({ message, status = 0, code = 0, requestId = "", type = "upstream" }) { @@ -17305,7 +17316,7 @@ function createClient(cfg, log = noop) { return await execWithRetry(url, init, boundedTimeoutMs(timeoutMs, cfg.deadlineAt), log, requestId); } catch (err) { if (route && err instanceof EvermeError && err.type === "upstream" && !err.httpStatus) { - const fix = cfg.brand === "everos" ? "run `evercli doctor`" : "open EverMe Desktop"; + const fix = cfg.brand === "everos" ? "run `evercli doctor`" : "open EverMe Desktop or run `evercli memory status`"; err.message = boundedDiagnostic( `local memory service is not reachable (${err.message}); ${fix}`, 240 @@ -17446,7 +17457,7 @@ async function execOnce(url, init, timeoutMs, requestId = "") { const code = Number(env?.status) || 0; const errType = code >= 3e4 && code < 30300 && code !== 30104 ? "auth" : "upstream"; throw new EvermeError({ - message: code === MEMORY_STORED_ON_DEVICE ? storedOnDeviceMessage(env?.result?.deviceName) : env?.error || `HTTP ${res.status}`, + message: refusalMessage(code, env) || env?.error || `HTTP ${res.status}`, status: res.status, code, requestId: env?.requestId || requestId, @@ -17951,7 +17962,7 @@ function formatQueryStats(stats) { } // ../memory-mcp/src/mcp.js -var PKG_VERSION = true ? "0.7.13" : createRequire(import.meta.url)("../package.json").version; +var PKG_VERSION = true ? "0.7.14" : createRequire(import.meta.url)("../package.json").version; var EVERME_MCP_INSTRUCTIONS = [ "EverMe is the user's long-term memory across sessions.", "",