Add OpenCode agent support - #18
Open
scross01 wants to merge 6 commits into
Open
Conversation
OPENCODE_SESSION_ID env var was proposed but never shipped. Session ID is available in event.properties.sessionID for session.created events.
- Compare bundled version + byte-for-byte content before writing - Skip write only when version AND content are already identical - Write to .tmp then rename for atomic swap on failure - Plugin version is now strictly kept in sync with app
Add opencode wrapper script that survives the agent process (no exec), providing real PID tracking via SEANCE_OPENCODE_PID and guaranteed session-end cleanup on agent exit. Add clear_status_on_end field to AgentConfig (true for all agents, preserving existing behavior) so the wrapper's session-end hook clears the sidebar status when opencode exits.
Author
|
@no1msd I have additional working updates that add support for KiloCode, and MimoCode which are based on OpenCode, and well as agent support for Mistral Vibe Code if your looking to adding more agents to Seance. |
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.
Add OpenCode agent support. #9
Extends Séance's agent tracking to OpenCode sessions, matching the existing Claude
Code/Codex/Pi integration pattern.
How it works
OpenCode uses a plugin system rather than CLI hooks. Séance ships a small
TypeScript plugin (plugins/seance-opencode/index.ts) that bridges OpenCode's event
bus to Séance's socket API:
On first launch, Séance auto-installs the plugin to ~/.config/opencode/plugins/ if
the OpenCode config directory exists. Subsequent launches check a version marker
(// @seance-version N) and update if bundled is newer.
Changes
Core (Zig)
dispatch, help text
checks/updates version
Plugin (TypeScript)
opencode-hook via Bun shell
Build
Docs
Testing
Manually tested local AppImage build. Confirmed OpenCode agent status is shown in side bar.