Skip to content

feat!: drop opencode-claude-auth integration entirely (#117)#118

Merged
chubes4 merged 1 commit intomainfrom
purge-opencode-claude-auth
May 4, 2026
Merged

feat!: drop opencode-claude-auth integration entirely (#117)#118
chubes4 merged 1 commit intomainfrom
purge-opencode-claude-auth

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented May 4, 2026

Summary

Closes #117. wp-coding-agents no longer installs, patches, or references the third-party opencode-claude-auth plugin on any chat bridge.

Changed

Removed

  • runtimes/opencode.sh::_install_opencode_wrapper — the bash shim template + install logic
  • runtimes/opencode.sh::_patch_claude_auth_plugin — the PascalCase patch invocation
  • runtimes/opencode.sh OPENCODE_PLUGINS branch that emitted "opencode-claude-auth@latest" for 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 that pinned the install behavior)
  • .github/workflows/shell.yml opencode-wrapper job

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 opencode-wrapper-removal job.

Other

  • Bumped VERSION to 0.9.0.
  • Added [0.9.0] changelog entry under Removed / Added / Changed.
  • Updated skills/upgrade-wp-coding-agents/SKILL.md description to match the new behavior (removes legacy wrapper, no longer references the PascalCase patch).
  • Stripped out-of-date opencode-claude-auth@latest references from comments in upgrade.sh and lib/repair-opencode-json.py.

Validation

Ran on the workspace checkout (/var/lib/datamachine/workspace/wp-coding-agents):

  • bash -n clean on upgrade.sh, runtimes/opencode.sh, tests/opencode-wrapper-removal.sh
  • python3 -c "ast.parse(...)" clean on lib/repair-opencode-json.py
  • tests/opencode-wrapper-removal.sh12/12 assertions pass
  • tests/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 — pass

tests/bridge-render.sh shows a pre-existing kimaki-launchd snapshot drift that reproduces against main without my changes — unrelated to this PR.

Breaking change

feat!: because any downstream relying on wp-coding-agents to install or patch opencode-claude-auth will lose that behavior. 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.

Manual remediation parity

The PR's _remove_legacy_opencode_wrapper produces the same end state as the manual fix already applied to the extrachill.com VPS earlier today:

cd /usr/lib/node_modules/opencode-ai/bin
rm opencode opencode.bak.*
ln .opencode opencode

After this lands and a fresh ./upgrade.sh runs, every Kimaki VPS that grew the wrapper gets the same cleanup automatically.

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
@chubes4 chubes4 merged commit 9b5d276 into main May 4, 2026
3 checks passed
@chubes4 chubes4 deleted the purge-opencode-claude-auth branch May 4, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

opencode loads kimaki-managed config only — project opencode.json::instructions never reaches LLM context

1 participant