Add OpenCode agent support and allow enable without hook installation#315
Open
MementoMori123 wants to merge 2 commits intoentireio:mainfrom
Open
Add OpenCode agent support and allow enable without hook installation#315MementoMori123 wants to merge 2 commits intoentireio:mainfrom
MementoMori123 wants to merge 2 commits intoentireio:mainfrom
Conversation
This commit introduces the OpenCodeAgent, which implements the Agent interface for the Entire CLI. The new agent supports detection of OpenCode presence in repositories, manages session data, and provides methods for reading and writing session information. It also includes configuration handling and session ID transformations, laying the groundwork for future integration with OpenCode's plugin system.
Add OpenCodeAgent implementation for Entire CLI
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.
Summary
Adds OpenCode as a supported agent so Entire can be used in OpenCode projects. OpenCode is detected via
.opencode/oropencode.json. Because OpenCode is expected to integrate via its own plugin (callingentire hooks ...), this agent does not install or manage hooks; the setup flow is updated soentire enablecan succeed for such agents.Changes
New agent: OpenCode (
cmd/entire/cli/agent/opencode/)Agentinterface: detection, session ID transform, session dir resolution, protected dirs (.opencode), and resume command.SupportsHooks()returnsfalse; hook input parsing is unimplemented (returns a clear error if used).Setup behavior
entire enablewithout installing hooks. Entire’s git hooks and strategy setup still run; only agent-specific hook installation is skipped.Registration
config.goandhooks_cmd.goso it is discoverable and usable when OpenCode (or its plugin) invokes the CLI.Testing
mise run test(unit tests including new registry test foropencode).entire enablein a repo with.opencode/oropencode.jsoncompletes successfully and does not require hook support.