fix: update plugin for OpenCode 1.16.0+ compatibility and add schema migration#527
Open
High-cla wants to merge 2 commits into
Open
fix: update plugin for OpenCode 1.16.0+ compatibility and add schema migration#527High-cla wants to merge 2 commits into
High-cla wants to merge 2 commits into
Conversation
- Tests database path detection - Verifies PRAGMA schema inspection - Confirms no-op when seq already has DEFAULT 0 - Validates graceful failure on missing binary
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/27087761913 Artifacts expire in 7 days. |
Collaborator
|
Hi @High-cla Thanks for the PR. I have made some fixes in dev for the 1.16+ support. Can you check if that works for you |
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
Fixes two compatibility issues between CodeNomad and OpenCode v1.16.0+:
Issue #525 — Plugin Compatibility with OpenCode 1.16.0+
Changes:
packages/opencode-plugin/package.json: Bumped@opencode-ai/pluginfrom1.3.7to^1.16.0and added the"oc-plugin"field for npm plugin discoverypackages/opencode-plugin/plugin/codenomad.ts: Updated to the newPlugintype from@opencode-ai/plugin, replaced the oldchat.messagehook withexperimental.chat.system.transform, and addedexport const server: Pluginfor the PluginModule format (required by the v1.16+ loader)packages/opencode-plugin/plugin/lib/background-process.ts: Changedtoolimport from@opencode-ai/plugin/toolto@opencode-ai/plugin(tool is now re-exported from the main entry)Issue #31204 —
session_message.seqNOT NULL Constraint FailureChanges:
packages/server/src/workspaces/migration.ts(new): Non-blocking schema migration utility that checks the OpenCode database and fixes theseqcolumn if neededpackages/server/src/workspaces/runtime.ts: CallscheckAndFixOpencodeSchema()before spawning OpenCode instancesThe migration handles three cases:
ALTER TABLE ADD COLUMN seq INTEGER NOT NULL DEFAULT 0Testing
tsc --noEmiton both packages: Zero errorsopencode dbcommand (no external dependencies)