fix(opencode): restore project plugin tools #275

Merged
jwilger merged 1 commit from fix/pr-metadata-and-chat-feedback into main 2026-05-19 15:18:10 -07:00
Owner

Why:

  • RGR ledger tools disappeared from opencode sessions because project plugin tests were being auto-discovered as plugins and project plugins failed to load under opencode's Bun runtime.
  • SQLite-backed RGR state is required for tokenless implementation leases and must not silently degrade.

What:

  • Move plugin tests from .opencode/plugins/ to .opencode/plugin-tests/ and update just opencode-test.
  • Explicitly register project-local plugins in opencode.json and export server entrypoints.
  • Support both Node node:sqlite and Bun bun:sqlite for persisted RGR state.
  • Add config coverage for explicit project plugin registration and server entrypoints.

Validation:

  • just opencode-test
  • opencode debug config --print-logs --log-level DEBUG
Why: - RGR ledger tools disappeared from opencode sessions because project plugin tests were being auto-discovered as plugins and project plugins failed to load under opencode's Bun runtime. - SQLite-backed RGR state is required for tokenless implementation leases and must not silently degrade. What: - Move plugin tests from `.opencode/plugins/` to `.opencode/plugin-tests/` and update `just opencode-test`. - Explicitly register project-local plugins in `opencode.json` and export `server` entrypoints. - Support both Node `node:sqlite` and Bun `bun:sqlite` for persisted RGR state. - Add config coverage for explicit project plugin registration and server entrypoints. Validation: - `just opencode-test` - `opencode debug config --print-logs --log-level DEBUG`
fix(opencode): restore project plugin tools
All checks were successful
CI / Classify changed paths (pull_request) Successful in 1s
CI / Format check (pull_request) Has been skipped
CI / Clippy (pull_request) Has been skipped
CI / Test (pull_request) Has been skipped
CI / Dependency policy (pull_request) Has been skipped
CI / Build (pull_request) Has been skipped
CI / Request auto_review semantic review (pull_request) Successful in 1s
CI / opencode plugin tests (pull_request) Successful in 8s
CI / Build PR artifacts (no token) (pull_request) Has been skipped
auto_review auto_review: no findings
110a3d9ec4
Why:
- RGR ledger tools disappeared because opencode tried to load plugin test files and project plugins failed under the Bun plugin runtime.
- SQLite-backed RGR state must remain available for tokenless implementation leases instead of silently degrading.

What:
- Move plugin tests out of auto-discovered plugin paths and update the opencode test recipe.
- Explicitly register project plugins and export server entrypoints.
- Support Node and Bun SQLite backends for persisted RGR state.

Validation:
- just opencode-test
- opencode debug config --print-logs --log-level DEBUG
auto-review left a comment

The PR addresses issues with plugin discovery and SQLite persistence by reorganizing test files, explicitly registering plugins, and supporting both Node and Bun SQLite modules. The changes appear well-structured and safe to merge.

Walkthrough

  • Test File Reorganization:

    • Test files have been moved from .opencode/plugins/ to .opencode/plugin-tests/ to prevent auto-discovery issues.
    • The Justfile has been updated to reflect the new test file locations.
  • Plugin Registration:

    • Plugins are now explicitly registered in opencode.json to ensure they are loaded correctly.
    • Each plugin exports a server entrypoint to comply with opencode requirements.
  • SQLite Module Support:

    • The code now supports both node:sqlite and bun:sqlite for SQLite-backed RGR state, ensuring compatibility with different runtimes.
    • A new function openStateDb abstracts the logic for loading the appropriate SQLite module.

LLM usage and cost

The PR addresses issues with plugin discovery and SQLite persistence by reorganizing test files, explicitly registering plugins, and supporting both Node and Bun SQLite modules. The changes appear well-structured and safe to merge. ## Walkthrough - **Test File Reorganization**: - Test files have been moved from `.opencode/plugins/` to `.opencode/plugin-tests/` to prevent auto-discovery issues. - The `Justfile` has been updated to reflect the new test file locations. - **Plugin Registration**: - Plugins are now explicitly registered in `opencode.json` to ensure they are loaded correctly. - Each plugin exports a `server` entrypoint to comply with `opencode` requirements. - **SQLite Module Support**: - The code now supports both `node:sqlite` and `bun:sqlite` for SQLite-backed RGR state, ensuring compatibility with different runtimes. - A new function `openStateDb` abstracts the logic for loading the appropriate SQLite module. ## LLM usage and cost - Reasoning (gpt-4o) in=3809 out=343 cost=$0.024190 - Cheap (gpt-4o-mini) in=432 out=48 cost=$0.000094 Estimated total USD: $0.024284 via https://api.openai.com and https://api.openai.com
jwilger deleted branch fix/pr-metadata-and-chat-feedback 2026-05-19 15:18:10 -07:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Slipstream/auto_review!275
No description provided.