ox-adapter-opencode

command
v0.6.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

ox-adapter-opencode is the external adapter binary for OpenCode sessions.

OpenCode stores sessions in a SQLite database at ~/.local/share/opencode/opencode.db. Hooks are installed as TypeScript plugins at .opencode/plugin/ox-prime.ts. Session reading queries SQLite directly using modernc.org/sqlite (pure Go, no CGo).

serve.go handles the long-running serve mode for incremental session reading.

session.go handles OpenCode session reading from SQLite.

OpenCode stores sessions in ~/.local/share/opencode/opencode.db with two tables: sessions (id, title, created_at, updated_at) and messages (id, session_id, role, parts JSON, model, created_at). The parts column is a JSON array of {type, data} wrappers where type is one of: text, tool_call, tool_result, reasoning, finish.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL