Documentation
¶
Index ¶
- Constants
- Variables
- func CreateOrSwitchToMainRepoSessionAndRunCommand(ctx context.Context, planName string, commandToRun []string) error
- func CreateOrSwitchToWorktreeSessionAndRunCommand(ctx context.Context, plan *orchestration.Plan, worktreeName string, ...) error
- func ExportedCompleteJob(job *orchestration.Job, plan *orchestration.Plan, silent bool) error
- func ExportedFindAllDependents(job *orchestration.Job, plan *orchestration.Plan) []*orchestration.Job
- func ExportedFindRootJobs(plan *orchestration.Plan) []*orchestration.Job
- func ExportedVerifyRunningJobStatus(plan *orchestration.Plan)
- func FlowStatusProvider(s state.State) (string, error)
- func GetChatCommand() *cobra.Command
- func GetRegisterCodexSessionCmd() *cobra.Command
- func GetRegisterOpencodeSessionCmd() *cobra.Command
- func InitPlanStatusFlags()
- func NewActionCmd() *cobra.Command
- func NewAddCmd() *cobra.Command
- func NewCompleteCmd() *cobra.Command
- func NewConfigCmd() *cobra.Command
- func NewCurrentCmd() *cobra.Command
- func NewFinishCmd() *cobra.Command
- func NewGraphCmd() *cobra.Command
- func NewHoldCmd() *cobra.Command
- func NewListCmd() *cobra.Command
- func NewModelsCmd() *cobra.Command
- func NewOpenCmd() *cobra.Command
- func NewPlanCmd() *cobra.Command
- func NewPlanConfigCmd() *cobra.Command
- func NewPlanContextCmd() *cobra.Command
- func NewPlanCurrentCmd() *cobra.Command
- func NewPlanExtractCmd() *cobra.Command
- func NewPlanFinishCmd() *cobra.Command
- func NewPlanHoldCmd() *cobra.Command
- func NewPlanJobsCmd() *cobra.Command
- func NewPlanResumeCmd() *cobra.Command
- func NewPlanSetCmd() *cobra.Command
- func NewPlanUnholdCmd() *cobra.Command
- func NewPlanUnsetCmd() *cobra.Command
- func NewResumeCmd() *cobra.Command
- func NewReviewCmd() *cobra.Command
- func NewRunCmd() *cobra.Command
- func NewSetCmd() *cobra.Command
- func NewStarshipCmd() *cobra.Command
- func NewStatusCmd() *cobra.Command
- func NewStepCmd() *cobra.Command
- func NewTmuxCmd() *cobra.Command
- func NewTmuxStatusCmd() *cobra.Command
- func NewUnholdCmd() *cobra.Command
- func NewUnsetCmd() *cobra.Command
- func NewVersionCmd() *cobra.Command
- func RunPlanAddStep(cmd *PlanAddStepCmd) error
- func RunPlanConfig(cmd *PlanConfigCmd) error
- func RunPlanGraph(cmd *PlanGraphCmd) error
- func RunPlanInit(cmd *PlanInitCmd) error
- func RunPlanInitTUI(dir string, cliCmd *PlanInitCmd) error
- func RunPlanStatus(cmd *cobra.Command, args []string) error
- func VerifyRunningJobStatus(plan *orchestration.Plan)
- type AgentConfig
- type AppConfig
- type BlockInfo
- type DependencyGraph
- type EcosystemRepoStatus
- type FlowConfig
- type GitStatusInfo
- type GraphPageData
- type GraphStats
- type JobEnrichmentOptions
- type Model
- type PlanAddStepCmd
- type PlanConfigCmd
- type PlanGraphCmd
- type PlanInitCmd
- type PlanListItem
- type PlanStatistics
- type PlanSummary
- type ProviderConfig
- type RecipeConfig
- type WorktreeStatus
Constants ¶
const ( MainScreen planInitScreen = iota AdvancedScreen )
const RollingPlanName = "rolling"
RollingPlanName is the name of the auto-created rolling plan used when no plan is specified.
Variables ¶
var ErrTUIQuit = errors.New("quit")
Functions ¶
func CreateOrSwitchToMainRepoSessionAndRunCommand ¶
func CreateOrSwitchToMainRepoSessionAndRunCommand(ctx context.Context, planName string, commandToRun []string) error
CreateOrSwitchToMainRepoSessionAndRunCommand creates or switches to a tmux session in the main repo and executes a command. This is similar to CreateOrSwitchToWorktreeSessionAndRunCommand but operates in the main repository.
func CreateOrSwitchToWorktreeSessionAndRunCommand ¶
func CreateOrSwitchToWorktreeSessionAndRunCommand(ctx context.Context, plan *orchestration.Plan, worktreeName string, commandToRun []string) error
CreateOrSwitchToWorktreeSessionAndRunCommand creates or switches to a tmux session for the worktree and executes a command.
func ExportedCompleteJob ¶
func ExportedCompleteJob(job *orchestration.Job, plan *orchestration.Plan, silent bool) error
ExportedCompleteJob exports completeJob for use by the status_tui package
func ExportedFindAllDependents ¶
func ExportedFindAllDependents(job *orchestration.Job, plan *orchestration.Plan) []*orchestration.Job
ExportedFindAllDependents exports findAllDependents for use by the status_tui package
func ExportedFindRootJobs ¶
func ExportedFindRootJobs(plan *orchestration.Plan) []*orchestration.Job
ExportedFindRootJobs exports findRootJobs for use by the status_tui package
func ExportedVerifyRunningJobStatus ¶
func ExportedVerifyRunningJobStatus(plan *orchestration.Plan)
ExportedVerifyRunningJobStatus exports VerifyRunningJobStatus for use by the status_tui package
func FlowStatusProvider ¶
FlowStatusProvider is the status provider for grove-flow. It generates the starship prompt status string based on the active plan.
func GetChatCommand ¶
func InitPlanStatusFlags ¶
func InitPlanStatusFlags()
InitPlanStatusFlags initializes the flags for the status command
func NewActionCmd ¶
func NewCompleteCmd ¶
NewCompleteCmd creates the top-level `complete` command.
func NewConfigCmd ¶
NewConfigCmd creates the top-level `config` command. This delegates to the existing NewPlanConfigCmd from plan_config.go
func NewCurrentCmd ¶
NewCurrentCmd creates the top-level `current` command.
func NewFinishCmd ¶
NewFinishCmd creates the top-level `finish` command.
func NewGraphCmd ¶
NewGraphCmd creates the top-level `graph` command.
func NewModelsCmd ¶
NewModelsCmd creates the flow models command.
func NewPlanCmd ¶
NewPlanCmd returns the plan command with all subcommands configured.
func NewPlanConfigCmd ¶
NewPlanConfigCmd creates a new plan config command
func NewPlanContextCmd ¶
NewPlanContextCmd creates the plan context command.
func NewPlanCurrentCmd ¶
NewPlanCurrentCmd creates the plan current command.
func NewPlanExtractCmd ¶
NewPlanExtractCmd creates the jobs extract command.
func NewPlanFinishCmd ¶
NewPlanFinishCmd creates the `plan finish` command.
func NewPlanHoldCmd ¶
NewPlanHoldCmd creates the `plan hold` command.
func NewPlanJobsCmd ¶
func NewPlanResumeCmd ¶
NewPlanResumeCmd creates the `plan resume` command.
func NewPlanSetCmd ¶
NewPlanSetCmd creates the plan set command.
func NewPlanUnholdCmd ¶
NewPlanUnholdCmd creates the `plan unhold` command.
func NewPlanUnsetCmd ¶
NewPlanUnsetCmd creates the plan unset command.
func NewResumeCmd ¶
NewResumeCmd creates the top-level `resume` command.
func NewReviewCmd ¶
NewReviewCmd creates the top-level `review` command.
func NewStarshipCmd ¶
func NewStatusCmd ¶
func NewTmuxCmd ¶
NewTmuxCmd returns the tmux command with all subcommands configured.
func NewTmuxStatusCmd ¶
NewTmuxStatusCmd returns the command for opening plan status in a tmux window.
func NewUnholdCmd ¶
NewUnholdCmd creates the top-level `unhold` command.
func NewUnsetCmd ¶
NewUnsetCmd creates the top-level `unset` command.
func NewVersionCmd ¶
func RunPlanAddStep ¶
func RunPlanAddStep(cmd *PlanAddStepCmd) error
func RunPlanConfig ¶
func RunPlanConfig(cmd *PlanConfigCmd) error
RunPlanConfig executes the plan config command
func RunPlanGraph ¶
func RunPlanGraph(cmd *PlanGraphCmd) error
func RunPlanInit ¶
func RunPlanInit(cmd *PlanInitCmd) error
RunPlanInit implements the plan init command.
func RunPlanInitTUI ¶
func RunPlanInitTUI(dir string, cliCmd *PlanInitCmd) error
RunPlanInitTUI launches the interactive TUI for creating a new plan.
func RunPlanStatus ¶
RunPlanStatus implements the status command.
func VerifyRunningJobStatus ¶
func VerifyRunningJobStatus(plan *orchestration.Plan)
VerifyRunningJobStatus checks the PID liveness for jobs marked as running. If a job's process is dead, its status is updated in-memory to "interrupted".
Types ¶
type AgentConfig ¶
type AgentConfig struct {
Args []string `yaml:"args"`
MountWorkspaceAtHostPath bool `yaml:"mount_workspace_at_host_path"`
UseSuperprojectRoot bool `yaml:"use_superproject_root"`
InteractiveProvider string `yaml:"interactive_provider,omitempty"` // "claude", "codex", or "opencode"
Providers map[string]ProviderConfig `yaml:"providers"`
}
AgentConfig defines the structure for the 'agent' section in grove.yml.
type AppConfig ¶
type AppConfig struct {
Core *config.Config
Flow *FlowConfig
Agent *AgentConfig
}
AppConfig wraps the core config with flow-specific extensions.
type BlockInfo ¶
type BlockInfo struct {
ID string `json:"id"`
Type string `json:"type"`
LineStart int `json:"line_start"`
Preview string `json:"preview"`
}
BlockInfo represents information about an extractable block
type DependencyGraph ¶
type EcosystemRepoStatus ¶
type EcosystemRepoStatus struct {
Name string
MergeStatus string
GitStatus *git.StatusInfo
}
EcosystemRepoStatus holds detailed status for a single repo in an ecosystem plan.
type FlowConfig ¶
type FlowConfig struct {
ChatDirectory string `yaml:"chat_directory"`
OneshotModel string `yaml:"oneshot_model"`
TargetAgentContainer string `yaml:"target_agent_container"`
PlansDirectory string `yaml:"plans_directory"`
MaxConsecutiveSteps int `yaml:"max_consecutive_steps"`
SummarizeOnComplete bool `yaml:"summarize_on_complete"`
SummaryModel string `yaml:"summary_model"`
SummaryPrompt string `yaml:"summary_prompt"`
SummaryMaxChars int `yaml:"summary_max_chars"`
RunInitByDefault *bool `yaml:"run_init_by_default"` // Whether to run init actions by default (nil = true)
Recipes map[string]RecipeConfig `yaml:"recipes"`
}
FlowConfig defines the structure for the 'flow' section in grove.yml.
type GitStatusInfo ¶
type GitStatusInfo struct {
Clean bool `json:"clean"`
AheadCount int `json:"ahead_count"`
BehindCount int `json:"behind_count"`
HasUntracked bool `json:"has_untracked"`
HasModified bool `json:"has_modified"`
HasStaged bool `json:"has_staged"`
}
GitStatusInfo contains git repository status information
type GraphPageData ¶
type GraphPageData struct {
PlanName string
Stats GraphStats
MermaidGraph string
}
type GraphStats ¶
type JobEnrichmentOptions ¶
type JobEnrichmentOptions struct {
NoteRef string
Repository string
Worktree string
IsNoteTarget bool
}
JobEnrichmentOptions holds context for enriching job frontmatter during plan init. This ensures consistent behavior across recipe-based and manual job creation.
type PlanAddStepCmd ¶
type PlanAddStepCmd struct {
Dir string `arg:"" help:"Plan directory"`
Template string `flag:"" help:"Name of the job template to use"`
Type string `flag:"t" default:"interactive_agent" help:"Job type: oneshot, chat, interactive_agent, headless_agent, shell, or file"`
Title string `flag:"" help:"Job title"`
DependsOn []string `flag:"d" help:"Dependencies (job filenames)"`
PromptFile string `flag:"f" help:"File containing the prompt"`
IncludeFiles []string `flag:"" sep:"," help:"Comma-separated list of files to include as context"`
Prompt string `flag:"p" help:"Inline prompt text"`
Interactive bool `flag:"i" help:"Interactive mode"`
Worktree string `flag:"" help:"Explicitly set the worktree name (overrides automatic inference)"`
Model string `flag:"" help:"LLM model to use for this job"`
Inline []string `flag:"" sep:"," help:"File types to inline in prompt: dependencies, include, context, all, files, none (comma-separated)"`
PrependDependencies bool `flag:"" help:"[DEPRECATED] Use --inline=dependencies instead. Inline dependency content into prompt body."`
Recipe string `flag:"" help:"Name of a recipe to add to the plan"`
RecipeVars []string `flag:"" help:"Variables for the recipe templates (e.g., key=value)"`
SourceFile string `flag:"" help:"Origin file path for tracking job provenance (e.g., Claude plan file)"`
}
func (*PlanAddStepCmd) Run ¶
func (c *PlanAddStepCmd) Run() error
type PlanConfigCmd ¶
PlanConfigCmd represents the plan config command
type PlanGraphCmd ¶
type PlanGraphCmd struct {
Directory string `arg:"" help:"Plan directory"`
Format string `flag:"f" default:"mermaid" help:"Output format: mermaid, dot, ascii"`
Serve bool `flag:"s" help:"Serve interactive HTML visualization"`
Port int `flag:"p" default:"8080" help:"Port for web server"`
Output string `flag:"o" help:"Output file (stdout if not specified)"`
}
func (*PlanGraphCmd) Run ¶
func (c *PlanGraphCmd) Run() error
type PlanInitCmd ¶
type PlanInitCmd struct {
Dir string
Force bool
Model string
Worktree string
Container string
ExtractAllFrom string
OpenSession bool
Recipe string
RecipeVars []string
RecipeCmd string
Repos []string // List of repos to include in ecosystem worktree
NoteRef string
FromNote string
NoteTargetFile string
RunInit bool // Run init actions from workspace_init.yml
}
PlanInitCmd holds the parameters for the init command.
type PlanListItem ¶
type PlanListItem struct {
Plan *orchestration.Plan
Name string
JobCount int
Status string
StatusParts map[string]int // For detailed status breakdown
LastUpdated time.Time // When the plan was last modified
Worktree string // Worktree associated with the plan
GitStatus *git.StatusInfo // Git status information for the worktree
ReviewStatus string // Review status like "In Progress"
MergeStatus string // Merge status: "Ready", "Needs Rebase", "Merged"
Notes string // User notes/description
EcosystemRepoStatuses []EcosystemRepoStatus // Detailed status for each repo in an ecosystem plan
}
PlanListItem represents a plan in the TUI list
type PlanStatistics ¶
type PlanStatistics struct {
Completed int
Running int
Pending int
Failed int
Todo int
Hold int
Abandoned int
Total int
}
PlanStatistics holds the statistics for a plan.
func GetPlanStatistics ¶
func GetPlanStatistics(plan *orchestration.Plan) PlanStatistics
GetPlanStatistics calculates statistics for a plan. This is extracted from the plan status command to be reused by the starship provider.
type PlanSummary ¶
type PlanSummary struct {
ID string `json:"id"`
Title string `json:"title"`
Path string `json:"path"`
Status string `json:"status"`
JobCount int `json:"job_count"`
Jobs []*orchestration.Job `json:"jobs,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Repository string `json:"repository,omitempty"`
WorkspaceName string `json:"workspace_name,omitempty"`
WorkspacePath string `json:"workspace_path,omitempty"`
}
PlanSummary represents a plan in the JSON output
type ProviderConfig ¶
type ProviderConfig struct {
Args []string `yaml:"args"`
}
ProviderConfig holds settings for a specific agent provider.
type RecipeConfig ¶
RecipeConfig defines configuration for a specific recipe.
type WorktreeStatus ¶
type WorktreeStatus struct {
Name string `json:"name"`
Branch string `json:"branch,omitempty"`
GitStatus *GitStatusInfo `json:"git_status,omitempty"`
MergeStatus string `json:"merge_status"`
ReviewStatus string `json:"review_status"`
}
WorktreeStatus represents git and worktree information for JSON output
Source Files
¶
- chat.go
- config.go
- config_commands.go
- docker_check.go
- helpers.go
- models.go
- plan.go
- plan_action.go
- plan_active.go
- plan_add_step.go
- plan_add_tui.go
- plan_complete.go
- plan_config.go
- plan_context.go
- plan_extract.go
- plan_finish.go
- plan_finish_tui.go
- plan_graph.go
- plan_helpers.go
- plan_hold.go
- plan_init.go
- plan_init_tui.go
- plan_jobs.go
- plan_jobs_rename.go
- plan_jobs_update_deps.go
- plan_list.go
- plan_merge_worktree.go
- plan_open.go
- plan_recipes_cmd.go
- plan_resume.go
- plan_review.go
- plan_run.go
- plan_session.go
- plan_status.go
- plan_status_tui.go
- plan_step.go
- plan_templates.go
- plan_tui.go
- plan_update_note_ref.go
- plan_update_worktree.go
- register_codex_session.go
- register_opencode_session.go
- root_commands.go
- starship.go
- starship_provider.go
- status_tui_helpers.go
- tmux.go
- tmux_status.go
- tui_utils.go
- version.go