codemem 0.20.8 → 0.20.9
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/dist/commands/setup.d.ts +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/package.json +4 -14
- package/.opencode/entry.js +0 -5
- package/.opencode/lib/compat.js +0 -171
- package/.opencode/package.json +0 -6
- package/.opencode/plugins/codemem.js +0 -1904
package/dist/commands/setup.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Replaces Python's install_plugin_cmd + install_mcp_cmd.
|
|
5
5
|
*
|
|
6
6
|
* What it does:
|
|
7
|
-
* 1. Adds "codemem" to the plugin array in ~/.config/opencode/opencode.jsonc
|
|
7
|
+
* 1. Adds "@codemem/opencode-plugin" to the plugin array in ~/.config/opencode/opencode.jsonc
|
|
8
8
|
* 2. Adds/updates the MCP entry in ~/.config/opencode/opencode.jsonc
|
|
9
9
|
* 3. For Claude Code: installs MCP config and guides marketplace plugin install
|
|
10
10
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiRpC,eAAO,MAAM,YAAY,SA6BtB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1359,7 +1359,7 @@ function writeJsonConfig(path, data) {
|
|
|
1359
1359
|
* Replaces Python's install_plugin_cmd + install_mcp_cmd.
|
|
1360
1360
|
*
|
|
1361
1361
|
* What it does:
|
|
1362
|
-
* 1. Adds "codemem" to the plugin array in ~/.config/opencode/opencode.jsonc
|
|
1362
|
+
* 1. Adds "@codemem/opencode-plugin" to the plugin array in ~/.config/opencode/opencode.jsonc
|
|
1363
1363
|
* 2. Adds/updates the MCP entry in ~/.config/opencode/opencode.jsonc
|
|
1364
1364
|
* 3. For Claude Code: installs MCP config and guides marketplace plugin install
|
|
1365
1365
|
*
|
|
@@ -1372,7 +1372,8 @@ function claudeConfigDir() {
|
|
|
1372
1372
|
return join(homedir(), ".claude");
|
|
1373
1373
|
}
|
|
1374
1374
|
/** The npm package name used in the OpenCode plugin array. */
|
|
1375
|
-
var OPENCODE_PLUGIN_SPEC = "codemem";
|
|
1375
|
+
var OPENCODE_PLUGIN_SPEC = "@codemem/opencode-plugin";
|
|
1376
|
+
var LEGACY_OPENCODE_PLUGIN_SPECS = ["codemem", "@kunickiaj/codemem"];
|
|
1376
1377
|
/** Remove legacy copied plugin JS file from ~/.config/opencode/plugins/codemem.js */
|
|
1377
1378
|
function migrateLegacyOpencodePlugin() {
|
|
1378
1379
|
const legacyPlugin = join(opencodeConfigDir(), "plugins", "codemem.js");
|
|
@@ -1444,12 +1445,15 @@ function installPlugin(force) {
|
|
|
1444
1445
|
}
|
|
1445
1446
|
let plugins = config.plugin;
|
|
1446
1447
|
if (!Array.isArray(plugins)) plugins = [];
|
|
1447
|
-
const
|
|
1448
|
-
|
|
1448
|
+
const isManagedPluginSpec = (entry) => typeof entry === "string" && [OPENCODE_PLUGIN_SPEC, ...LEGACY_OPENCODE_PLUGIN_SPECS].some((spec) => entry === spec || entry.startsWith(`${spec}@`));
|
|
1449
|
+
const hasCanonicalSpec = plugins.some((entry) => typeof entry === "string" && (entry === OPENCODE_PLUGIN_SPEC || entry.startsWith(`${OPENCODE_PLUGIN_SPEC}@`)));
|
|
1450
|
+
const hasLegacySpec = plugins.some((entry) => typeof entry === "string" && LEGACY_OPENCODE_PLUGIN_SPECS.some((spec) => entry === spec || entry.startsWith(`${spec}@`)));
|
|
1451
|
+
if (hasCanonicalSpec && !hasLegacySpec && !force) {
|
|
1449
1452
|
p.log.info(`Plugin "${OPENCODE_PLUGIN_SPEC}" already in plugin array`);
|
|
1450
1453
|
return true;
|
|
1451
1454
|
}
|
|
1452
|
-
|
|
1455
|
+
plugins = plugins.filter((entry) => !isManagedPluginSpec(entry));
|
|
1456
|
+
if (hasLegacySpec) p.log.step("Removed legacy OpenCode plugin spec(s): codemem / @kunickiaj/codemem");
|
|
1453
1457
|
plugins.push(OPENCODE_PLUGIN_SPEC);
|
|
1454
1458
|
config.plugin = plugins;
|
|
1455
1459
|
try {
|