Documentation
¶
Overview ¶
Package cmd implements the bc CLI commands.
Index ¶
- func CompleteAgentNames(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func CompleteChannelNames(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func CompleteRoleNames(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func Execute() error
- func InitWithPreset(dir string, preset WizardPreset) error
- func Root() *cobra.Command
- func RunServer(addr, wsRoot, corsOrigin, apiKey string) error
- func RunWizard(dir string) error
- func SetVersionInfo(v, c, d string)
- type AgentHealth
- type ChannelInfo
- type WizardPreset
- type WizardState
- type WorkspaceContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompleteAgentNames ¶
func CompleteAgentNames(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
CompleteAgentNames returns a completion function for agent names
func CompleteChannelNames ¶
func CompleteChannelNames(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
CompleteChannelNames returns a completion function for channel names
func CompleteRoleNames ¶
func CompleteRoleNames(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
CompleteRoleNames returns a completion function for role names. Uses the daemon API to get role names (roles are managed by bcd, not local files).
func InitWithPreset ¶
func InitWithPreset(dir string, preset WizardPreset) error
InitWithPreset initializes a workspace with a specific preset (non-interactive).
func RunServer ¶
RunServer starts the bc server (formerly bcd) in the foreground. It loads the workspace registry, constructs shared Globals, builds the launch workspace's WorkspaceServices via the server-side factory, wires handlers, and blocks until the context is canceled or a signal is received.
func SetVersionInfo ¶
func SetVersionInfo(v, c, d string)
SetVersionInfo sets the version information from build flags.
Types ¶
type AgentHealth ¶
type AgentHealth struct {
Name string `json:"name"`
Role string `json:"role"`
Status string `json:"status"`
LastUpdated string `json:"last_updated"`
StaleDuration string `json:"stale_duration,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
StuckReason string `json:"stuck_reason,omitempty"`
StuckDetails string `json:"stuck_details,omitempty"`
TmuxAlive bool `json:"tmux_alive"`
StateFresh bool `json:"state_fresh"`
IsStuck bool `json:"is_stuck,omitempty"`
}
AgentHealth represents the health status of an agent.
type ChannelInfo ¶
type ChannelInfo struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Members []string `json:"members"`
MemberCount int `json:"member_count"`
HistoryCount int `json:"history_count"`
}
ChannelInfo represents detailed channel information for JSON output.
type WizardPreset ¶
type WizardPreset string
WizardPreset represents a preconfigured workspace setup.
const ( PresetSolo WizardPreset = "solo" PresetSmallTeam WizardPreset = "small-team" PresetFullTeam WizardPreset = "full-team" PresetCustom WizardPreset = "custom" )
type WizardState ¶
type WizardState struct {
Dir string
Nickname string
Tool string
Preset WizardPreset
Channels []string
Step int
TotalStep int
}
WizardState tracks the wizard's progress and collected data.
func NewWizardState ¶
func NewWizardState(dir string) *WizardState
NewWizardState creates a new wizard state for the given directory.
Source Files
¶
- agent.go
- agent_health.go
- channel.go
- completion.go
- config.go
- cost.go
- cost_analytics.go
- cost_budget.go
- cost_report.go
- cost_usage.go
- cron.go
- doctor.go
- down.go
- env.go
- helpers.go
- home.go
- init.go
- init_bootstrap.go
- init_wizard.go
- logs.go
- mcp.go
- notify.go
- report.go
- root.go
- secret.go
- serve.go
- stats.go
- status.go
- template.go
- tool.go
- tui_embed.go
- up.go
- workspace.go