[tool]
name = "opencode"
display_name = "OpenCode"
version = "1.0"
# sst/opencode stores session data under ~/.local/share/opencode/ and
# respects AGENTS.md plus per-project opencode.json(c) config. Session
# data is keyed on absolute project path; home-dir reconciliation is
# v0.4 `migrate` scope, so on_move stays `notify` for now.
on_move = "notify"
binary = "opencode"

session_patterns = [
  "AGENTS.md",
  ".opencodeignore",
  "opencode.json",
  "opencode.jsonc",
]

# OpenCode stores its session database (SQLite, with WAL) at the XDG
# data location with no documented env-var or config-file override.
# For `sessionguard migrate` that's the `discovery = "symlink"` case:
# rsync the data to the new location, then leave a symlink at the
# canonical path so OpenCode opens the DB transparently. Verified
# against opencode 0.x on Linux + macOS — the daemon follows the
# symlink and writes through it without complaint.
[tool.home_dir_layout]
default_path = "~/.local/share/opencode"
discovery = "symlink"
