context-mode 1.0.137 → 1.0.138
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.openclaw-plugin/openclaw.plugin.json +1 -1
- package/.openclaw-plugin/package.json +1 -1
- package/README.md +5 -1
- package/build/adapters/jetbrains-copilot/hooks.d.ts +11 -3
- package/build/adapters/jetbrains-copilot/hooks.js +11 -7
- package/build/adapters/vscode-copilot/hooks.d.ts +27 -3
- package/build/adapters/vscode-copilot/hooks.js +27 -12
- package/build/cli.js +199 -32
- package/build/openclaw-plugin.d.ts +130 -0
- package/build/openclaw-plugin.js +626 -0
- package/build/opencode-plugin.d.ts +122 -0
- package/build/opencode-plugin.js +372 -0
- package/build/pi-extension.d.ts +14 -0
- package/build/pi-extension.js +451 -0
- package/build/server.js +4 -1
- package/build/util/db-lock.d.ts +65 -0
- package/build/util/db-lock.js +166 -0
- package/cli.bundle.mjs +173 -160
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/scripts/heal-installed-plugins.mjs +115 -1
- package/scripts/postinstall.mjs +16 -18
- package/server.bundle.mjs +43 -43
- package/start.mjs +11 -14
package/start.mjs
CHANGED
|
@@ -174,7 +174,7 @@ if (cacheMatch) {
|
|
|
174
174
|
// truth) so users who fix themselves via `npm install -g context-mode`
|
|
175
175
|
// follow the exact same code path. Best-effort, never blocks MCP boot.
|
|
176
176
|
try {
|
|
177
|
-
const { healInstalledPlugins, healSettingsEnabledPlugins, healPluginJsonMcpServers,
|
|
177
|
+
const { healInstalledPlugins, healSettingsEnabledPlugins, healPluginJsonMcpServers, sweepStaleMcpJson } =
|
|
178
178
|
await import("./scripts/heal-installed-plugins.mjs");
|
|
179
179
|
const pluginKey = "context-mode@context-mode";
|
|
180
180
|
const claudeConfigDir = resolveClaudeConfigDir();
|
|
@@ -193,12 +193,6 @@ try {
|
|
|
193
193
|
// path baked in. Iterates EVERY installed cache entry's installPath so
|
|
194
194
|
// multi-version installs all self-recover. Each call is independently wrapped
|
|
195
195
|
// because one poisoned entry must not block heals on the others. Best effort.
|
|
196
|
-
//
|
|
197
|
-
// v1.0.122 — Layer 5b extended (Issue #531): asymmetric-heal sibling for the
|
|
198
|
-
// `.mcp.json` file Claude Code reads at plugin load. Same per-entry loop, same
|
|
199
|
-
// defensive wrap. Covers both the #253/aea633c bare `./start.mjs` fresh-install
|
|
200
|
-
// regression AND the /ctx-upgrade tmpdir leak class. Both heals must run on
|
|
201
|
-
// every boot so users self-recover regardless of which drift shape hit them.
|
|
202
196
|
try {
|
|
203
197
|
if (existsSync(registryPath)) {
|
|
204
198
|
const ip = JSON.parse(readFileSync(registryPath, "utf-8"));
|
|
@@ -214,17 +208,20 @@ try {
|
|
|
214
208
|
pluginKey,
|
|
215
209
|
});
|
|
216
210
|
} catch { /* best effort — per-entry */ }
|
|
217
|
-
try {
|
|
218
|
-
healMcpJsonArgs({
|
|
219
|
-
pluginRoot: installPath,
|
|
220
|
-
pluginCacheRoot,
|
|
221
|
-
pluginKey,
|
|
222
|
-
});
|
|
223
|
-
} catch { /* best effort — per-entry */ }
|
|
224
211
|
}
|
|
225
212
|
}
|
|
226
213
|
}
|
|
227
214
|
} catch { /* best effort */ }
|
|
215
|
+
// Issue #609 — Layer 5c (replaces v1.0.122 healMcpJsonArgs per-entry loop):
|
|
216
|
+
// sweep stale `.mcp.json` files from every per-version cache dir. cli.ts
|
|
217
|
+
// no longer writes `.mcp.json` (PR fix for #609), so the only `.mcp.json`
|
|
218
|
+
// files in the cache are stale carry-forwards from earlier installs or
|
|
219
|
+
// Claude Code's plugin manager copying them between version dirs. Removing
|
|
220
|
+
// them blocks the previous-version-carry replay vector at MCP boot.
|
|
221
|
+
// One sweep per boot — bounded, idempotent, best-effort.
|
|
222
|
+
try {
|
|
223
|
+
sweepStaleMcpJson({ pluginCacheRoot, pluginKey });
|
|
224
|
+
} catch { /* best effort */ }
|
|
228
225
|
} catch { /* best effort — never block MCP boot */ }
|
|
229
226
|
|
|
230
227
|
// ── Self-heal Layer 4: Deploy global SessionStart hook + register in settings.json ──
|