@cortexkit/opencode-magic-context 0.8.1 → 0.8.2
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/README.md +7 -1
- package/dist/cli/doctor.d.ts +3 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli.js +9 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -140,7 +140,13 @@ Already installed but something isn't working? Run the doctor to check and auto-
|
|
|
140
140
|
bunx @cortexkit/opencode-magic-context doctor
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
Doctor checks for conflicts (compaction, DCP, OMO hooks), ensures the TUI sidebar is configured,
|
|
143
|
+
Doctor checks for conflicts (compaction, DCP, OMO hooks), ensures the TUI sidebar is configured, verifies the plugin is registered, and checks the npm cache — fixing what it can automatically.
|
|
144
|
+
|
|
145
|
+
Use `--force` to force-clear the plugin cache even when versions match (fixes broken transitive dependencies):
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
bunx @cortexkit/opencode-magic-context doctor --force
|
|
149
|
+
```
|
|
144
150
|
|
|
145
151
|
---
|
|
146
152
|
|
package/dist/cli/doctor.d.ts
CHANGED
package/dist/cli/doctor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AA2GA,wBAAsB,SAAS,
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AA2GA,wBAAsB,SAAS,CAAC,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAuMlF"}
|
package/dist/cli.js
CHANGED
|
@@ -9610,7 +9610,7 @@ function getOpenCodeCacheDir() {
|
|
|
9610
9610
|
}
|
|
9611
9611
|
return join7(homedir3(), ".cache", "opencode");
|
|
9612
9612
|
}
|
|
9613
|
-
async function clearPluginCache() {
|
|
9613
|
+
async function clearPluginCache(force = false) {
|
|
9614
9614
|
const cacheDir = getOpenCodeCacheDir();
|
|
9615
9615
|
const pluginCacheDir = join7(cacheDir, "packages", PLUGIN_ENTRY_WITH_VERSION);
|
|
9616
9616
|
if (!existsSync5(pluginCacheDir)) {
|
|
@@ -9635,7 +9635,7 @@ async function clearPluginCache() {
|
|
|
9635
9635
|
break;
|
|
9636
9636
|
} catch {}
|
|
9637
9637
|
}
|
|
9638
|
-
if (cachedVersion && cachedVersion === selfVersion) {
|
|
9638
|
+
if (!force && cachedVersion && cachedVersion === selfVersion) {
|
|
9639
9639
|
return {
|
|
9640
9640
|
action: "up_to_date",
|
|
9641
9641
|
path: pluginCacheDir,
|
|
@@ -9656,7 +9656,7 @@ async function clearPluginCache() {
|
|
|
9656
9656
|
return { action: "error", path: pluginCacheDir, error: msg };
|
|
9657
9657
|
}
|
|
9658
9658
|
}
|
|
9659
|
-
async function runDoctor() {
|
|
9659
|
+
async function runDoctor(options = {}) {
|
|
9660
9660
|
Wt2("Magic Context Doctor");
|
|
9661
9661
|
let issues = 0;
|
|
9662
9662
|
let fixed = 0;
|
|
@@ -9744,7 +9744,7 @@ async function runDoctor() {
|
|
|
9744
9744
|
}
|
|
9745
9745
|
} catch {}
|
|
9746
9746
|
}
|
|
9747
|
-
const cacheResult = await clearPluginCache();
|
|
9747
|
+
const cacheResult = await clearPluginCache(options.force);
|
|
9748
9748
|
if (cacheResult.action === "cleared") {
|
|
9749
9749
|
const versionInfo = cacheResult.cached ? ` (cached: ${cacheResult.cached}${cacheResult.latest ? `, latest: ${cacheResult.latest}` : ""})` : "";
|
|
9750
9750
|
R2.success(`Cleared outdated plugin cache${versionInfo} — latest will download on restart`);
|
|
@@ -10103,15 +10103,17 @@ var command = process.argv[2];
|
|
|
10103
10103
|
if (command === "setup") {
|
|
10104
10104
|
runSetup().then((code) => process.exit(code));
|
|
10105
10105
|
} else if (command === "doctor") {
|
|
10106
|
-
|
|
10106
|
+
const force = process.argv.includes("--force");
|
|
10107
|
+
runDoctor({ force }).then((code) => process.exit(code));
|
|
10107
10108
|
} else {
|
|
10108
10109
|
console.log("");
|
|
10109
10110
|
console.log(" Magic Context CLI");
|
|
10110
10111
|
console.log(" ─────────────────");
|
|
10111
10112
|
console.log("");
|
|
10112
10113
|
console.log(" Commands:");
|
|
10113
|
-
console.log(" setup
|
|
10114
|
-
console.log(" doctor
|
|
10114
|
+
console.log(" setup Interactive setup wizard (first-time install)");
|
|
10115
|
+
console.log(" doctor Check and fix configuration issues");
|
|
10116
|
+
console.log(" doctor --force Force clear plugin cache (fixes broken dependencies)");
|
|
10115
10117
|
console.log("");
|
|
10116
10118
|
console.log(" Usage:");
|
|
10117
10119
|
console.log(" bunx @cortexkit/opencode-magic-context setup");
|
package/package.json
CHANGED