Skip to content

v2.0.5

Choose a tag to compare

@github-actions github-actions released this 26 Jun 17:38
· 72 commits to main since this release
8b04f5f

Installation

Fresh install

npm install -g https://github.com/Khip01/opencode-rich-presence/releases/download/v2.0.5/opencode-rich-presence-v2.0.5.tgz
opencode-rpc install

The installer creates a symlink at ~/.config/opencode/plugins/opencode-rich-presence.js so OpenCode loads the plugin as a local file (the package is distributed only via GitHub Releases, not the npm registry). It also adds @xhayper/discord-rpc to your local package.json and runs npm install so the worker can resolve its dependency.

The installer offers to register the plugin in opencode.jsonc automatically. You only need to add it manually if you decline the prompt:

{
  "plugin": ["opencode-rich-presence"]
}

Update from v2.0.x

opencode-rpc update

Or reinstall manually:

npm install -g https://github.com/Khip01/opencode-rich-presence/releases/download/v2.0.5/opencode-rich-presence-v2.0.5.tgz

Migrating from v1.0.0

v1.0.0 used bash scripts (install, uninstall, restart-discord.sh) and was Linux-only.

  1. Back up your old ~/.config/opencode/discord-config.json if you have one.
  2. Run the fresh install command above.
  3. Run opencode-rpc install to set up the new config file.
  4. Restore your settings into the new config (App ID, presence templates).
  5. Manually remove old v1.0.0 leftovers from ~/.config/opencode/:
    rm -rf ~/.config/opencode/plugins/opencode-dc-too-rich-presence.js
    rm -f ~/.config/opencode/discord-worker.mjs
    rm -f ~/.config/opencode/restart-discord.sh
    rm -f ~/.config/opencode/package.json ~/.config/opencode/package-lock.json
    rm -f ~/.config/opencode/CUSTOMIZATION.md ~/.config/opencode/README.md ~/.config/opencode/SETUP.md
  6. Restart OpenCode.

The plugin name changed from opencode-dc-too-rich-presence to opencode-rich-presence.

What's in v2.0.5

Fix: worker path

  • Correct worker path in src/shared/paths.js (../../worker/ to ../worker/)
  • Plugin no longer gets stuck with lock held but worker unable to spawn

Fix: install flow

  • Install symlinks plugin entry to ~/.config/opencode/plugins/opencode-rich-presence.js
  • Install adds @xhayper/discord-rpc to local package.json and runs npm install
  • Install auto-registers plugin entry in opencode.jsonc with JSONC-tolerant parsing
  • Install skips "edit config" suggestion when Discord App ID is already set

Fix: uninstall flow

  • Uninstall removes the local symlink
  • Uninstall prunes @xhayper/discord-rpc from package.json via npm install
  • Uninstall asks Y/N before deleting discord-config.json, with timestamp backup if yes
  • Uninstall prints a code snippet for removing the plugin entry from opencode.jsonc

Fix: CLI stability

  • prompt.js uses a single long-lived readline interface (no more install hang, supports piped stdin)
  • bin/opencode-rpc.js calls process.exit(0) after command completes (no more post-Done hang)

Fix: JSONC parser

  • :// in URLs no longer treated as a line comment (negative lookbehind on :)

Chore: docs

  • docs/TROUBLESHOOTING.md adds root causes section and diagnostic checklist
  • docs/CLI-REFERENCE.md rewritten to match real v2.0.5 CLI output
  • docs/INSTALL.md rewritten for symlink-based install flow
  • docs/ARCHITECTURE.md adds plugin loading section and corrects subcommands table
  • docs/PLATFORM-NOTES.md removes Discord Desktop process management sections

See CHANGELOG.md for full details.