pub fn detect_opencode_storage_surface(
data_root: &Path,
) -> Option<(OpenCodeStorageSurface, PathBuf)>Expand description
Probe data_root (e.g. ~/.local/share/opencode) for the OpenCode
storage surface present, per the discovery rules frozen in
docs/interop/opencode-pi-spec.md §1.2/S9a: $OPENCODE_DB wins outright;
otherwise glob opencode*.db (not just opencode.db — dev/beta channels
suffix the filename, database.ts:43-55); otherwise look for the JSON
tree generation-B marker (storage/migration); otherwise generation-A’s
project/ subtree. Returns None if nothing is found.