Documentation
¶
Index ¶
- func CleanupDeadSessions(storage interfaces.SessionStorer) (int, error)
- func CleanupDeadSessionsWithThreshold(storage interfaces.SessionStorer, inactivityThreshold time.Duration) (int, error)
- func CleanupStaleFlowJobs() (int, error)
- func DiscoverFlowJobs() ([]*models.Session, error)
- func DiscoverLiveInteractiveSessions(storage interfaces.SessionStorer) ([]*models.Session, error)
- func DiscoverOpenCodeSessions() ([]*models.Session, error)
- func DispatchStateChangeNotifications(oldSessions, newSessions []*models.Session)
- func EnableBackgroundRefresh()
- func Execute()
- func GetAllSessions(storage interfaces.SessionStorer, hideCompleted bool) ([]*models.Session, error)
- func GetCachedFlowJobs() ([]*models.Session, error)
- func NewBrowseCmd() *cobra.Command
- func NewCleanupCmd() *cobra.Command
- func NewDebugWorkspacesCmd() *cobra.Command
- func NewInstallCmd() *cobra.Command
- func NewOpencodeCmd() *cobra.Command
- func NewRootCmd() *cobra.Command
- func NewSessionsCmd() *cobra.Command
- func NewVersionCmd() *cobra.Command
- func StartBackgroundRefresh()
- type ClaudeSettings
- type Hook
- type HookEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupDeadSessions ¶
func CleanupDeadSessions(storage interfaces.SessionStorer) (int, error)
CleanupDeadSessions checks all running/idle sessions and marks dead ones as completed Uses default 30 minute inactivity threshold
func CleanupDeadSessionsWithThreshold ¶
func CleanupDeadSessionsWithThreshold(storage interfaces.SessionStorer, inactivityThreshold time.Duration) (int, error)
CleanupDeadSessionsWithThreshold checks all running/idle sessions and marks inactive ones as completed Returns the number of sessions cleaned up
func CleanupStaleFlowJobs ¶
CleanupStaleFlowJobs discovers grove-flow jobs with stale lock files and updates their status Returns the number of jobs cleaned up Note: This function is maintained for backwards compatibility but the actual grove-flow job cleanup logic is handled by grove-flow itself now
func DiscoverFlowJobs ¶
DiscoverFlowJobs implements a stale-while-revalidate strategy for fast TUI startup.
func DiscoverLiveInteractiveSessions ¶
func DiscoverLiveInteractiveSessions(storage interfaces.SessionStorer) ([]*models.Session, error)
DiscoverLiveInteractiveSessions scans ~/.grove/hooks/sessions/ directory and returns live sessions from all interactive providers (Claude, Codex, etc.) A session is considered live if its PID is still alive
func DiscoverOpenCodeSessions ¶
DiscoverOpenCodeSessions scans ~/.local/share/opencode/storage/ for OpenCode sessions. This provides discovery for sessions started outside of grove-flow.
func DispatchStateChangeNotifications ¶
DispatchStateChangeNotifications compares old and new sessions and sends notifications for relevant state changes
func EnableBackgroundRefresh ¶
func EnableBackgroundRefresh()
EnableBackgroundRefresh enables periodic cache updates in the background
func Execute ¶
func Execute()
Execute runs the appropriate command or hook based on how the binary was called.
func GetAllSessions ¶
func GetAllSessions(storage interfaces.SessionStorer, hideCompleted bool) ([]*models.Session, error)
GetAllSessions fetches sessions from all sources, merges them, and sorts them.
func GetCachedFlowJobs ¶
GetCachedFlowJobs returns cached flow jobs without triggering a refresh. Returns empty slice if cache doesn't exist or is expired.
func NewBrowseCmd ¶
func NewCleanupCmd ¶
func NewDebugWorkspacesCmd ¶
func NewInstallCmd ¶
func NewOpencodeCmd ¶
NewOpencodeCmd creates the `opencode` command and its subcommands.
func NewRootCmd ¶
NewRootCmd creates the root command for grove-hooks.
func NewSessionsCmd ¶
func NewVersionCmd ¶
func StartBackgroundRefresh ¶
func StartBackgroundRefresh()
StartBackgroundRefresh safely starts the background refresh loop once.
Types ¶
type ClaudeSettings ¶
type ClaudeSettings map[string]interface{}