feat: add OpenCode integration (plugin + setup)#339
feat: add OpenCode integration (plugin + setup)#339ComputelessComputer wants to merge 1 commit intortk-ai:masterfrom
Conversation
Add support for OpenCode (sst/opencode) alongside the existing Claude Code integration. RTK's rewrite engine (rtk rewrite) is agent-agnostic; this PR wires it into OpenCode's plugin system. New files: - opencode/plugins/rtk-rewrite.ts — tool.execute.before hook that calls rtk rewrite to transparently rewrite bash commands - opencode/rtk-awareness.md — slim RTK instructions for AGENTS.md - opencode/setup.sh — one-command installer (global or per-project) - opencode/README.md — setup guide and comparison with Claude Code flow Co-Authored-By: Oz <oz-agent@warp.dev>
|
Thanks for the contribution! OpenCode support has been merged into |
|
ComputelessComputer seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
Hi! Two things needed before we can review:
Thanks! |
|
Hey We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes No logic changes — only file moves and import path updates. What you need to doRebase your branch on git fetch origin && git rebase origin/developGit detects renames automatically. If you get import conflicts, update the paths: use crate::git; // now: use crate::cmds::git::git;
use crate::tracking; // now: use crate::core::tracking;
use crate::config; // now: use crate::core::config;
use crate::init; // now: use crate::hooks::init;
use crate::gain; // now: use crate::analytics::gain;Need help rebasing? Tag @aeppling |
Summary
Add support for OpenCode alongside the existing Claude Code integration. RTK's rewrite engine (
rtk rewrite) is already agent-agnostic — this PR wires it into OpenCode's plugin system.What's included
opencode/plugins/rtk-rewrite.tstool.execute.beforehook that callsrtk rewriteto transparently rewrite bash commandsopencode/rtk-awareness.mdAGENTS.md(meta commands, verification)opencode/setup.shopencode/README.mdHow it works
OpenCode plugins hook into
tool.execute.before. When the tool isbash, the plugin:output.args.commandrtk rewrite <cmd>(same Rust binary / registry used by the Claude Code hook)Commands already prefixed with
rtkand heredocs are skipped. The plugin gracefully disables itself if rtk is missing or < 0.23.0.Setup
Or manually copy
opencode/plugins/rtk-rewrite.tsto~/.config/opencode/plugins/.Co-Authored-By: Oz oz-agent@warp.dev