commands

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 33 Imported by: 0

Documentation

Index

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

func CleanupStaleFlowJobs() (int, error)

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 DispatchStateChangeNotifications

func DispatchStateChangeNotifications(oldSessions, newSessions []*models.Session)

DispatchStateChangeNotifications compares old and new sessions and sends notifications for relevant state changes

func EnableBackgroundRefresh

func EnableBackgroundRefresh()

EnableBackgroundRefresh is a no-op in Phase 3. The daemon now handles background session monitoring.

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 the daemon (or LocalClient fallback) and merges with DB history. This is now a thin client that delegates heavy scanning to core/pkg/sessions.

func NewBrowseCmd

func NewBrowseCmd() *cobra.Command

func NewCleanupCmd

func NewCleanupCmd() *cobra.Command

func NewDebugWorkspacesCmd

func NewDebugWorkspacesCmd() *cobra.Command

func NewInstallCmd

func NewInstallCmd() *cobra.Command

func NewOpencodeCmd

func NewOpencodeCmd() *cobra.Command

NewOpencodeCmd creates the `opencode` command and its subcommands.

func NewRootCmd

func NewRootCmd() *cobra.Command

NewRootCmd creates the root command for grove-hooks.

func NewSessionsCmd

func NewSessionsCmd() *cobra.Command

func NewVersionCmd

func NewVersionCmd() *cobra.Command

func StartBackgroundRefresh

func StartBackgroundRefresh()

StartBackgroundRefresh is a no-op in Phase 3. The daemon now handles background session monitoring.

Types

type ClaudeSettings

type ClaudeSettings map[string]interface{}

type Hook

type Hook struct {
	Type    string `json:"type"`
	Command string `json:"command"`
}

type HookEntry

type HookEntry struct {
	Matcher string `json:"matcher"`
	Hooks   []Hook `json:"hooks"`
}

Jump to

Keyboard shortcuts

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