Conversation
Local installs wrote durable plugin copies under kimaki-config but kept loading OpenCode plugins from npm's package directory, so npm update -g kimaki could erase the loaded files. Load and repair managed plugin paths against the persistent config directory instead, and keep post-upgrade focused on skills plus plugin validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
$KIMAKI_DATA_DIR/kimaki-config/pluginsinstead of npm package-localkimaki/pluginspaths.Problem
npm update -g kimakiwipes$(npm root -g)/kimaki/plugins/, and macOS local installs have no launchdExecStartPrehook to restore it. Whendm-context-filter.tsdisappears, Kimaki bridge content such as--worktree,--cwd, scheduled sends, and worktree creation instructions leaks into agent system prompts unfiltered.Reproducer
Observed ENOENT failures in
kimaki.error.logon May 2 and May 5 while OpenCode tried to load npm-dir plugin paths:Root cause
Local installs had a plugin path mismatch:
$KIMAKI_DATA_DIR/kimaki-config/plugins/, which survivesnpm update -g kimaki.$(npm root -g)/kimaki/plugins/, which is package-local and gets wiped by npm updates.Fix
opencode.jsonentries directly against$KIMAKI_DATA_DIR/kimaki-config/plugins/<plugin>.ts.bridge_sync_config.post-upgrade.shvalidate persistent plugin files by default instead of restoring them into npm package-local paths.dm-context-filter.tsordm-agent-sync.tswhen they point outside the persistent plugin directory.--kimaki-onlyupgrades so the documented repair command actually exercises the migration.VPS impact
None expected. VPS installs already use
/opt/kimaki-config/pluginsas the durable OpenCode plugin target, so the persistent source and loaded plugin path remain the same.Tests added
tests/opencode-local-plugin-path.shfor local-modeopencode.jsonplugin generation.tests/repair-opencode-json.shto verify additive repair rewrites stale npm-dir managed plugin paths.tests/post-upgrade-restore.shfor the new persistent-plugin validation behavior.Test status
bash upgrade.sh --kimaki-only --dry-run --wp-path /Users/chubes/Studio/intelligence-chubes4bash upgrade.sh --kimaki-only --repair-opencode-json --dry-run --wp-path /Users/chubes/Studio/intelligence-chubes4for test_script in tests/*.sh; do bash "$test_script"; donenode tests/effective-prompt/run.mjshomeboy testAI assistance