Expand description
OpenCode HarnessAdapter — Rust port of packages/cli/src/harnesses/opencode.ts.
OpenCode shares the pending-stamp + watch-loop shape with codex, so the
adapter is constructed via super::pending_stamp::session_store_adapter
instead of re-implementing the trait. The only opencode-specific bits are:
name = "opencode"— the dispatch key and log-line label.session_root—$HOME/.local/share/opencode/storage/session, resolved lazily so tests that override$HOMEsee the override. Mirrors the TS sibling’spath.join(homedir(), '.local', 'share', 'opencode', 'storage', 'session')exactly.ingest_sessions— defers torelayburn_sdk::ingest_opencode_sessions, the opencode-only ingest pass. The factory opens a fresh ledger handle per call (mirrors the TS lock-then-write-then-close shape; SQLite WAL keeps the per-tick open cheap).
Functions§
- adapter
- Hand out a
&'static dyn HarnessAdapterfor opencode. The registry calls this once at lazy-init time. Seepending_stamp::session_store_adapterfor the leak semantics.