Documentation
¶
Index ¶
- Constants
- func BuildStartupGuide(cfg config.Config, check provider.Availability, ...) tui.StartupGuide
- func CommandNames(commands []SlashCommand) []string
- func CompactLine(raw string, limit int) string
- func CompleteSlashCommand(input string, commands []SlashCommand) (string, []string)
- func ConfigPathHint(workspace, explicit string) string
- func ContainsCommand(commands []string, target string) bool
- func CreateSession(store *session.Store, workspace string) (*session.Session, error)
- func CurrentVersion() string
- func DefaultUsageLines() []string
- func DetectProjectRoot(start string) string
- func DispatchCLI(args []string, stdin io.Reader, stdout, stderr io.Writer, ...) error
- func IsBroadWorkspacePath(dir string) bool
- func IsBroadWorkspacePathWithHome(dir, home string) bool
- func IsFilesystemRoot(path string) bool
- func IsHighRiskWorkspacePath(dir string) bool
- func IsHighRiskWorkspacePathWithHome(dir, home string) bool
- func LoadRuntimeConfig(req ConfigRequest) (config.Config, error)
- func MatchSlashCommands(prefix string, commands []SlashCommand) []string
- func ParseSessionListLimit(raw string) (int, error)
- func RenderCommandSuggestions(w io.Writer, input string, suggestions []string)
- func RenderCurrentSession(w io.Writer, sess *session.Session)
- func RenderHelp(w io.Writer)
- func RenderSessionsView(w io.Writer, currentID string, summaries []session.Summary, warnings []string)
- func RenderSubAgentDetail(w io.Writer, agent subagentspkg.Agent)
- func RenderSubAgentsView(w io.Writer, agents []subagentspkg.Agent)
- func RenderUsage(w io.Writer)
- func RenderVersion(w io.Writer)
- func ResolveSessionID(store *session.Store, prefix string) (string, error)
- func ResolveWorkspace(workspaceOverride string) (string, error)
- func ResumeSessionInWorkspace(store *session.Store, currentWorkspace, sessionPrefix string) (*session.Session, error)
- func RunCLI(args []string, stdin io.Reader, stdout, stderr io.Writer) error
- func RunDemo(args []string, stdout, stderr io.Writer) error
- func RunDoctor(args []string, stdout, stderr io.Writer) error
- func RunInit(args []string, stdout, stderr io.Writer) error
- func RunInstall(args []string, stdout, stderr io.Writer) error
- func RunMCP(args []string, stdin io.Reader, stdout, stderr io.Writer) error
- func RunOneShot(req RunOneShotRequest) error
- func RunOneShotArgs(args []string, stdin io.Reader, stdout, stderr io.Writer) error
- func RunSafety(args []string, stdout, stderr io.Writer) error
- func RunTUI(req TUIRequest, runProgram func(tui.Options) error) error
- func RunTUIArgs(args []string, stdin io.Reader, stdout, stderr io.Writer) error
- func RunTrace(args []string, stdout, stderr io.Writer) error
- func RunWorkerArgs(args []string, stdin io.Reader, stdout, stderr io.Writer) error
- func SameWorkspace(a, b string) bool
- func StartupIssueHint(check provider.Availability) string
- type BootstrapRequest
- type ConfigRequest
- type DispatchHandlers
- type EntrypointRequest
- type HelpLine
- type RunOneShotRequest
- type Runtime
- type SessionSnapshotView
- type SessionSummaryView
- type SlashCommand
- type SlashExecution
- type SlashHandleResult
- type TUIRequest
- type TUIRuntime
Constants ¶
View Source
const DefaultBroadWorkspaceEntryThreshold = 300
View Source
const DefaultSessionListLimit = 8
Variables ¶
This section is empty.
Functions ¶
func BuildStartupGuide ¶
func BuildStartupGuide(cfg config.Config, check provider.Availability, workspace, explicitConfigPath string) tui.StartupGuide
func CommandNames ¶
func CommandNames(commands []SlashCommand) []string
func CompactLine ¶
func CompleteSlashCommand ¶
func CompleteSlashCommand(input string, commands []SlashCommand) (string, []string)
func ConfigPathHint ¶
func ContainsCommand ¶
func CreateSession ¶
func CurrentVersion ¶
func CurrentVersion() string
func DefaultUsageLines ¶
func DefaultUsageLines() []string
func DetectProjectRoot ¶
func DispatchCLI ¶
func IsBroadWorkspacePath ¶
func IsFilesystemRoot ¶
func IsHighRiskWorkspacePath ¶
func LoadRuntimeConfig ¶
func LoadRuntimeConfig(req ConfigRequest) (config.Config, error)
func MatchSlashCommands ¶
func MatchSlashCommands(prefix string, commands []SlashCommand) []string
func ParseSessionListLimit ¶
func RenderHelp ¶
func RenderSessionsView ¶
func RenderSubAgentDetail ¶
func RenderSubAgentDetail(w io.Writer, agent subagentspkg.Agent)
func RenderSubAgentsView ¶
func RenderSubAgentsView(w io.Writer, agents []subagentspkg.Agent)
func RenderUsage ¶
func RenderVersion ¶
func ResolveWorkspace ¶
func RunOneShot ¶
func RunOneShot(req RunOneShotRequest) error
func RunOneShotArgs ¶
func RunWorkerArgs ¶
func SameWorkspace ¶
func StartupIssueHint ¶
func StartupIssueHint(check provider.Availability) string
Types ¶
type BootstrapRequest ¶
type BootstrapRequest struct {
Workspace string
ConfigPath string
ModelOverride string
SessionID string
StreamOverride string
SandboxEnabledOverride string
SystemSandboxModeOverride string
ApprovalModeOverride string
AwayPolicyOverride string
MaxIterationsOverride int
RequireAPIKey bool
Stdin io.Reader
Stdout io.Writer
}
BootstrapRequest declares dependencies and runtime overrides needed to assemble the application runtime for CLI/TUI execution.
type ConfigRequest ¶
type ConfigRequest struct {
Workspace string
ConfigPath string
ModelOverride string
StreamOverride string
SandboxEnabledOverride string
SystemSandboxModeOverride string
ApprovalModeOverride string
AwayPolicyOverride string
MaxIterationsOverride int
}
ConfigRequest defines workspace config load plus CLI runtime overrides.
type DispatchHandlers ¶
type DispatchHandlers struct {
RunTUI func(args []string, stdin io.Reader, stdout, stderr io.Writer) error
RunOneShot func(args []string, stdin io.Reader, stdout, stderr io.Writer) error
RunWorker func(args []string, stdin io.Reader, stdout, stderr io.Writer) error
RunInstall func(args []string, stdout, stderr io.Writer) error
RunMCP func(args []string, stdin io.Reader, stdout, stderr io.Writer) error
RunDoctor func(args []string, stdout, stderr io.Writer) error
RunSafety func(args []string, stdout, stderr io.Writer) error
RunDemo func(args []string, stdout, stderr io.Writer) error
RunTrace func(args []string, stdout, stderr io.Writer) error
RunInit func(args []string, stdout, stderr io.Writer) error
RenderUsage func(w io.Writer)
RenderVersion func(w io.Writer)
}
type EntrypointRequest ¶
type EntrypointRequest struct {
WorkspaceOverride string
ConfigPath string
ModelOverride string
SessionID string
StreamOverride string
SandboxEnabledOverride string
SystemSandboxModeOverride string
ApprovalModeOverride string
AwayPolicyOverride string
MaxIterationsOverride int
RequireAPIKey bool
Stdin io.Reader
Stdout io.Writer
}
type HelpLine ¶
func DefaultHelpLines ¶
func DefaultHelpLines() []HelpLine
type RunOneShotRequest ¶
type Runtime ¶
type Runtime struct {
Config config.Config
Runner *agent.Runner
Store *session.Store
Session *session.Session
TaskManager runtimepkg.TaskManager
Extensions extensionspkg.Manager
}
Runtime is the assembled runtime bundle consumed by command entrypoints.
func Bootstrap ¶
func Bootstrap(req BootstrapRequest) (Runtime, error)
func BootstrapEntrypoint ¶
func BootstrapEntrypoint(req EntrypointRequest) (Runtime, error)
type SessionSnapshotView ¶
func BuildSessionSnapshotView ¶
func BuildSessionSnapshotView(sess *session.Session, location *time.Location) SessionSnapshotView
type SessionSummaryView ¶
type SessionSummaryView struct {
Marker string
ID string
Updated string
MessageCount int
Preview string
Workspace string
}
type SlashCommand ¶
func DefaultSlashCommands ¶
func DefaultSlashCommands() []SlashCommand
type SlashExecution ¶
type SlashExecution struct {
NextSession *session.Session
SessionToDisplay *session.Session
Handled bool
ShouldExit bool
Command string
UsageHint string
UnknownInput string
Suggestions []string
Summaries []session.Summary
Warnings []string
SubAgents []subagentspkg.Agent
SubAgentDetail *subagentspkg.Agent
}
func ExecuteSlashCommand ¶
func ExecuteSlashCommand(store *session.Store, current *session.Session, input string, commands []SlashCommand) (SlashExecution, error)
type SlashHandleResult ¶
func HandleSlashCommand ¶
func HandleSlashCommand(stdout io.Writer, store *session.Store, current *session.Session, input string, commands []SlashCommand) (SlashHandleResult, error)
type TUIRequest ¶
type TUIRuntime ¶
func BuildTUIRuntime ¶
func BuildTUIRuntime(req TUIRequest) (TUIRuntime, error)
func (TUIRuntime) Close ¶
func (r TUIRuntime) Close() error
Source Files
¶
- agent_source_adapter.go
- bootstrap.go
- cli_demo.go
- cli_dispatch.go
- cli_doctor.go
- cli_init.go
- cli_mcp.go
- cli_render.go
- cli_run.go
- cli_safety.go
- cli_text.go
- cli_trace.go
- cli_version.go
- commands.go
- config.go
- entrypoint.go
- install.go
- install_path_helpers.go
- install_path_windows_helpers.go
- install_target.go
- run_once.go
- session_utils.go
- session_view.go
- slash_handler.go
- slash_runtime.go
- startup_guide.go
- tui_adapter.go
- tui_run.go
- tui_runtime.go
- update_check.go
- version.go
- worker_run.go
- workspace.go
Click to show internal directories.
Click to hide internal directories.