feat!: drop opencode-claude-auth integration entirely (#117)#118
Merged
feat!: drop opencode-claude-auth integration entirely (#117)#118
Conversation
The opencode-claude-auth third-party plugin is not loaded, installed, or patched on any chat bridge anymore. Why --- - Kimaki bridges already use the built-in AnthropicAuthPlugin shipped with Kimaki v0.6.0+. wp-coding-agents has been correctly skipping the opencode-claude-auth@latest plugin entry on those installs since #51. - But upgrade.sh Phase 7 was still calling _install_opencode_wrapper unconditionally on every Kimaki VPS run, which replaced the npm-shipped opencode binary with a bash shim whose only job was to feed credentials into ~/.claude/.credentials.json for the plugin we no longer load. Dead weight on every kimaki upgrade. - Non-Kimaki bridges authenticate through opencode's native auth flow (`opencode auth login anthropic`); they do not need a third-party plugin either. What changed ------------ Removed: - runtimes/opencode.sh::_install_opencode_wrapper (the bash shim template + the install logic) - runtimes/opencode.sh::_patch_claude_auth_plugin (PascalCase patch invocation) - runtimes/opencode.sh OPENCODE_PLUGINS branch that emitted "opencode-claude-auth@latest" on non-kimaki bridges - lib/patch-claude-auth.py (entire file) - lib/repair-opencode-json.py expected_plugins() entry for opencode-claude-auth@latest - upgrade.sh::reapply_claude_auth_patch - tests/opencode-wrapper.sh (the test pinning the install behavior) - .github/workflows/shell.yml job that ran the wrapper install test Added: - runtimes/opencode.sh::_remove_legacy_opencode_wrapper. Detects the wp-coding-agents-opencode-wrapper-v2 sentinel on the global opencode binary, restores a hardlink (or symlink) to the real .opencode binary, and cleans up matching .bak.* files. Idempotent and a no-op on installs that never had the wrapper. - upgrade.sh::remove_legacy_opencode_wrapper_phase. Same Phase 7 slot, now exclusively dedicated to cleaning up after older upgrades. Existing kimaki VPS installs that grew the wrapper get repaired automatically on the next ./upgrade.sh run. - tests/opencode-wrapper-removal.sh regression: legacy wrapper is cleanly removed, repo no longer ships any of the install machinery, non-wrapper binaries are never touched. - .github/workflows/shell.yml job opencode-wrapper-removal. Bumped VERSION to 0.9.0 and added a [0.9.0] changelog entry under Removed / Added / Changed. This is a breaking change for any downstream that was depending on wp-coding-agents to install or patch opencode-claude-auth. Such a configuration was never the supported path on Kimaki bridges, and non-kimaki bridges now expect users to run `opencode auth login anthropic` themselves. Refs: #117
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
Closes #117. wp-coding-agents no longer installs, patches, or references the third-party
opencode-claude-authplugin on any chat bridge.AnthropicAuthPluginshipped with Kimaki v0.6.0+ already handles OAuth (token refresh, multi-account rotation, request rewriting). The plugin entry was correctly skipped on these bridges since Support multi-account Anthropic OAuth across all chat bridge and runtime combos #51 — butupgrade.shPhase 7 was still calling_install_opencode_wrapperunconditionally on every Kimaki VPS run, which replaced the npm-shippedopencodebinary with a bash shim whose only job was to feed credentials into~/.claude/.credentials.jsonfor the plugin we no longer load. That's exactly what surfaced as the bug on the extrachill.com VPS in opencode loads kimaki-managed config only — project opencode.json::instructions never reaches LLM context #117.opencode auth login anthropic). They never needed a third-party plugin either.Changed
Removed
runtimes/opencode.sh::_install_opencode_wrapper— the bash shim template + install logicruntimes/opencode.sh::_patch_claude_auth_plugin— the PascalCase patch invocationruntimes/opencode.shOPENCODE_PLUGINSbranch that emitted"opencode-claude-auth@latest"for non-kimaki bridgeslib/patch-claude-auth.py(entire file)lib/repair-opencode-json.pyexpected_plugins()entry foropencode-claude-auth@latestupgrade.sh::reapply_claude_auth_patchtests/opencode-wrapper.sh(the test that pinned the install behavior).github/workflows/shell.ymlopencode-wrapperjobAdded
runtimes/opencode.sh::_remove_legacy_opencode_wrapper. Detects thewp-coding-agents-opencode-wrapper-v2sentinel on the globalopencodebinary, restores a hardlink (or symlink) to the real.opencodebinary, and cleans up matching.bak.*files. Idempotent and a no-op on installs that never had the wrapper.upgrade.sh::remove_legacy_opencode_wrapper_phase. Same Phase 7 slot, now exclusively dedicated to cleaning up after older upgrades. Existing kimaki VPS installs that grew the wrapper get repaired automatically on the next./upgrade.shrun.tests/opencode-wrapper-removal.shregression: legacy wrapper is cleanly removed, repo no longer ships any of the install machinery, non-wrapper binaries are never touched..github/workflows/shell.ymlopencode-wrapper-removaljob.Other
VERSIONto0.9.0.[0.9.0]changelog entry under Removed / Added / Changed.skills/upgrade-wp-coding-agents/SKILL.mddescription to match the new behavior (removes legacy wrapper, no longer references the PascalCase patch).opencode-claude-auth@latestreferences from comments inupgrade.shandlib/repair-opencode-json.py.Validation
Ran on the workspace checkout (
/var/lib/datamachine/workspace/wp-coding-agents):bash -nclean onupgrade.sh,runtimes/opencode.sh,tests/opencode-wrapper-removal.shpython3 -c "ast.parse(...)"clean onlib/repair-opencode-json.pytests/opencode-wrapper-removal.sh— 12/12 assertions passtests/repair-opencode-json.sh— pass (existing regression, unaffected)tests/post-upgrade-restore.sh,tests/path-helpers.sh,tests/homeboy-components.sh,tests/kimaki-session-helper-smoke.sh— passtests/bridge-render.shshows a pre-existing kimaki-launchd snapshot drift that reproduces againstmainwithout my changes — unrelated to this PR.Breaking change
feat!:because any downstream relying on wp-coding-agents to install or patchopencode-claude-authwill lose that behavior. Such a configuration was never the supported path on Kimaki bridges, and non-kimaki bridges now expect users to runopencode auth login anthropicthemselves.Manual remediation parity
The PR's
_remove_legacy_opencode_wrapperproduces the same end state as the manual fix already applied to the extrachill.com VPS earlier today:After this lands and a fresh
./upgrade.shruns, every Kimaki VPS that grew the wrapper gets the same cleanup automatically.