Skip to content

Add OpenCode agent support and allow enable without hook installation#315

Open
MementoMori123 wants to merge 2 commits intoentireio:mainfrom
MementoMori123:main
Open

Add OpenCode agent support and allow enable without hook installation#315
MementoMori123 wants to merge 2 commits intoentireio:mainfrom
MementoMori123:main

Conversation

@MementoMori123
Copy link

Summary

Adds OpenCode as a supported agent so Entire can be used in OpenCode projects. OpenCode is detected via .opencode/ or opencode.json. Because OpenCode is expected to integrate via its own plugin (calling entire hooks ...), this agent does not install or manage hooks; the setup flow is updated so entire enable can succeed for such agents.

Changes

  • New agent: OpenCode (cmd/entire/cli/agent/opencode/)

    • Implements the Agent interface: detection, session ID transform, session dir resolution, protected dirs (.opencode), and resume command.
    • SupportsHooks() returns false; hook input parsing is unimplemented (returns a clear error if used).
    • Session read/write is implemented as a passthrough of OpenCode’s on-disk format so future hook/plugin integration can be added without changing this contract.
  • Setup behavior

    • Agents that do not support hooks (e.g. OpenCode) can complete entire enable without installing hooks. Entire’s git hooks and strategy setup still run; only agent-specific hook installation is skipped.
    • Message when no hooks are installed is updated to: “Hooks for … already installed or managed externally” so it’s accurate for both “already installed” and “managed by the agent/plugin elsewhere.”
  • Registration

    • OpenCode is registered in the agent registry and wired in config.go and hooks_cmd.go so it is discoverable and usable when OpenCode (or its plugin) invokes the CLI.

Testing

  • mise run test (unit tests including new registry test for opencode).
  • Manual: entire enable in a repo with .opencode/ or opencode.json completes successfully and does not require hook support.

hello hello and others added 2 commits February 11, 2026 18:53
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
@MementoMori123 MementoMori123 requested a review from a team as a code owner February 12, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant