Documentation
¶
Overview ¶
Package opencode provides the OpenCode agent source for agentwatch.
OpenCode stores sessions in a SQLite database (typically at ~/.local/share/opencode/opencode.db). This source queries the database read-only to discover and parse session state.
This source does NOT resolve the database path from XDG_DATA_HOME or any environment variable. Callers must supply the path explicitly via WithDBPath. If no path is provided the source returns no sessions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*Source)
Option configures a Source.
func WithDBPath ¶
WithDBPath sets the path to the OpenCode SQLite database. Without this option the source discovers no sessions.
func WithDiscoverWindow ¶
WithDiscoverWindow limits discovery to sessions whose updated_at is within d of the current time. Zero disables age filtering.
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source implements source.Source for OpenCode agent sessions.