shekohex/opencode-pty — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me an OpenCode plugin that lets the agent manage real interactive terminal sessions instead of only running one command and waiting for it to finish.

I want it to be able to start long running background sessions like dev servers, test watchers, REPLs, tunnels, or database processes, then later send input to them, read their output, search the output with regex, list what sessions are running, and kill or clean them up. It should support multiple sessions at once and keep the output buffered so the agent can inspect it on demand.

Also include a simple web UI where I can see all active sessions, watch live terminal output, type input into a session, see connection status, and stop sessions. Use real time updates so it feels like a terminal dashboard.

Make it work as an OpenCode plugin with slash commands to open the web UI and show the server URL. Please respect OpenCode bash permissions and clean up sessions when OpenCode ends. Use TypeScript, and look up current OpenCode plugin docs online if needed.

Want more depth? Deep Reverse