context-mode 1.0.114 → 1.0.116
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/.openclaw-plugin/openclaw.plugin.json +1 -1
- package/.openclaw-plugin/package.json +1 -1
- package/build/server.js +6 -2
- package/build/util/project-dir.d.ts +32 -2
- package/build/util/project-dir.js +109 -3
- package/cli.bundle.mjs +103 -102
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/scripts/heal-installed-plugins.mjs +52 -0
- package/scripts/postinstall.mjs +15 -1
- package/server.bundle.mjs +98 -97
- package/start.mjs +11 -8
package/start.mjs
CHANGED
|
@@ -122,16 +122,19 @@ if (cacheMatch) {
|
|
|
122
122
|
// truth) so users who fix themselves via `npm install -g context-mode`
|
|
123
123
|
// follow the exact same code path. Best-effort, never blocks MCP boot.
|
|
124
124
|
try {
|
|
125
|
-
const { healInstalledPlugins } =
|
|
125
|
+
const { healInstalledPlugins, healSettingsEnabledPlugins } =
|
|
126
|
+
await import("./scripts/heal-installed-plugins.mjs");
|
|
127
|
+
const pluginKey = "context-mode@context-mode";
|
|
126
128
|
const registryPath = resolve(homedir(), ".claude", "plugins", "installed_plugins.json");
|
|
127
129
|
const pluginCacheRoot = resolve(homedir(), ".claude", "plugins", "cache");
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
const settingsPath = resolve(homedir(), ".claude", "settings.json");
|
|
131
|
+
try { healInstalledPlugins({ registryPath, pluginCacheRoot, pluginKey }); }
|
|
132
|
+
catch { /* best effort */ }
|
|
133
|
+
// v1.0.116: Claude Code's plugin loader reads settings.json.enabledPlugins
|
|
134
|
+
// (NOT installed_plugins.json) — heal that one too so /ctx-upgrade-induced
|
|
135
|
+
// disable state is repaired before next /reload-plugins.
|
|
136
|
+
try { healSettingsEnabledPlugins({ settingsPath, pluginKey }); }
|
|
137
|
+
catch { /* best effort */ }
|
|
135
138
|
} catch { /* best effort — never block MCP boot */ }
|
|
136
139
|
|
|
137
140
|
// ── Self-heal Layer 4: Deploy global SessionStart hook + register in settings.json ──
|