Please look at our adapter implementation.
Soon, opencode is moving to a sqlite based storage model. The sqlite branch is here: https://github.com/anomalyco/opencode/tree/sqlite2
In a new worktree and project, create an adapter for the new sqlite based adapter, provide a plan for local testing with the new opencode nightly builds.