diff --git a/scripts/enable-plugins.js b/scripts/enable-plugins.js index b0bad33..e735e9d 100644 --- a/scripts/enable-plugins.js +++ b/scripts/enable-plugins.js @@ -13,13 +13,13 @@ if (!settingsPath) { const MARKETPLACES = { caveman: { source: { source: "github", repo: "JuliusBrussee/caveman" } }, ponytail: { source: { source: "github", repo: "DietrichGebert/ponytail" } }, - "codebase-memory": { source: { source: "github", repo: "DeusData/codebase-memory-mcp" } }, }; const PLUGINS = { "caveman@caveman": true, "ponytail@ponytail": true, - "codebase-memory@codebase-memory": true, }; +// Trip-wire: `codebase-memory-mcp install` registers the same server for every agent, Claude Code included; the plugin on top runs it twice. +const RETIRED_PLUGINS = { "codebase-memory@codebase-memory": "codebase-memory" }; const REMINDERS = ["kvb-dream", "kvb-coach"]; const RETIRED = [ "autotune/hooks/reminder.sh", @@ -53,6 +53,10 @@ for (const [name, entry] of Object.entries(MARKETPLACES)) { if (!data.extraKnownMarketplaces[name]) data.extraKnownMarketplaces[name] = entry; } data.enabledPlugins = Object.assign(data.enabledPlugins || {}, PLUGINS); +for (const [plugin, marketplace] of Object.entries(RETIRED_PLUGINS)) { + delete data.enabledPlugins[plugin]; + delete data.extraKnownMarketplaces[marketplace]; +} data.env = data.env || {}; if (!data.env.CLAUDE_CODE_AUTO_COMPACT_WINDOW) data.env.CLAUDE_CODE_AUTO_COMPACT_WINDOW = "500000"; @@ -124,4 +128,4 @@ for (const [script, event, matcher, sub] of SCRIPT_HOOKS) { } fs.writeFileSync(settingsPath, JSON.stringify(data, null, 2) + "\n"); -console.log(`skills: enabled the caveman, ponytail and codebase-memory plugins (plugin skill copies dropped from this .claude), the ${REMINDERS.join(" + ")} reminders, the kvb-org-organize claim gate, news hook and resource watch, and the kvb-org-perform log in ${settingsPath}`); +console.log(`skills: enabled the caveman and ponytail plugins (plugin skill copies dropped from this .claude), the ${REMINDERS.join(" + ")} reminders, the kvb-org-organize claim gate, news hook and resource watch, and the kvb-org-perform log in ${settingsPath}`); diff --git a/scripts/install.sh b/scripts/install.sh index ca40a67..f2611a4 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -64,15 +64,14 @@ if [[ "${TARGET}" == "${HOME}" ]]; then else warn "skills: no systemd user session; skipped the kvb-dream notification timer." fi - if ! command -v codebase-memory-mcp &>/dev/null && command -v yay &>/dev/null; then - log "skills: installing the codebase-memory-mcp code graph" - yay -S --needed codebase-memory-mcp-bin + log "skills: installing or updating the codebase-memory-mcp code graph for every detected agent" + if ! curl -fsSL --proto '=https' https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash; then + warn "skills: the codebase-memory-mcp installer failed; the code graph keeps its previous setup." fi - if command -v codebase-memory-mcp &>/dev/null; then + if (ulimit -c 0; codebase-memory-mcp config set auto_index true); then log "skills: auto-indexing every repository a session opens into the code graph" - codebase-memory-mcp config set auto_index true else - warn "skills: codebase-memory-mcp not installed; the code graph stays off (see kvb-agent-optimize)." + warn "skills: codebase-memory-mcp is not runnable from PATH; the code graph stays off (see kvb-agent-optimize)." fi fi diff --git a/skills/kvb-agent-optimize/SKILL.md b/skills/kvb-agent-optimize/SKILL.md index e70eea7..ddc0ca8 100644 --- a/skills/kvb-agent-optimize/SKILL.md +++ b/skills/kvb-agent-optimize/SKILL.md @@ -22,13 +22,13 @@ installed, and the state of the shared snapshot ## Step 2: index -- **Binary missing**: the skills repository's `make install` installs it - (`yay -S --needed codebase-memory-mcp-bin` where yay exists) and enables - the `codebase-memory@codebase-memory` plugin with its marketplace in the - settings. Installing touches the agent configuration and needs sudo, so it - is the operator's step: hand `make install` (or, without yay, the - package's install on that system) to the `kvb-org-operator` skill and - continue after the restart. +- **Binary missing**: the skills repository's `make install` runs the + upstream installer, which installs the checksum-verified release (static + on Linux) into `~/.local/bin` and wires the graph into every agent it + detects (Claude Code, Codex, Gemini, Hermes, OpenClaw and more); rerunning + it updates. It writes the agents' configuration, so it is the operator's + step: hand `make install` to the `kvb-org-operator` skill and continue + after the restart. - **Index**: once installed, the skills repository's `make install` switches `auto_index` on, so every repository a session opens is indexed and diff --git a/tests/test_dream.py b/tests/test_dream.py index 19dd39d..ec351b5 100644 --- a/tests/test_dream.py +++ b/tests/test_dream.py @@ -162,12 +162,18 @@ class TestSettingsRegistration(unittest.TestCase): self.assertEqual(gate.count("kvb-org-perform/scripts/log.py"), 1) self.assertEqual(post.count("kvb-org-perform/scripts/log.py"), 1) - def test_code_graph_plugin_is_enabled_with_its_marketplace(self): - data = self._patch() - self.assertTrue(data["enabledPlugins"]["codebase-memory@codebase-memory"]) - self.assertEqual( - data["extraKnownMarketplaces"]["codebase-memory"]["source"]["repo"], "DeusData/codebase-memory-mcp" + def test_code_graph_plugin_is_retired_for_the_agent_agnostic_installer(self): + self.settings.write_text( + json.dumps({ + "enabledPlugins": {"codebase-memory@codebase-memory": True}, + "extraKnownMarketplaces": {"codebase-memory": {"source": {"source": "github", "repo": "x/y"}}}, + }), + encoding="utf-8", ) + data = self._patch() + self.assertNotIn("codebase-memory@codebase-memory", data["enabledPlugins"]) + self.assertNotIn("codebase-memory", data["extraKnownMarketplaces"]) + self.assertTrue(data["enabledPlugins"]["caveman@caveman"]) def test_compact_window_is_set_once_and_never_overwritten(self): self.assertEqual(self._patch()["env"]["CLAUDE_CODE_AUTO_COMPACT_WINDOW"], "500000")