cmd

package
v0.168.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: Apache-2.0 Imports: 68 Imported by: 0

Documentation

Index

Constants

View Source
const ExitCodeMaxTurns = 2

ExitCodeMaxTurns is the process exit code when an agent run ends by exhausting agent.max_turns, so callers (e.g. infer-action) can tell turn exhaustion (2) apart from success (0) and failure (1).

Variables

View Source
var (
	V   *viper.Viper
	Cfg *config.Config
)

Global Viper instance and resolved Config used by every command. Both are populated exactly once by initConfig() at startup. Commands read Cfg directly instead of re-unmarshalling viper.

Functions

func ExecTool added in v0.41.0

func ExecTool(cfg *config.Config, args []string, format string) error

ExecTool executes a tool with the given arguments

func Execute

func Execute()

func GetProjectFlag added in v0.126.0

func GetProjectFlag(cmd *cobra.Command) bool

GetProjectFlag checks for the --project flag on the current command or any parent command. Userspace-first model (issue #680): config writes target the home ~/.infer/ baseline by default; --project opts into a project override.

func GetVersionInfo added in v0.85.0

func GetVersionInfo() domain.VersionInfo

GetVersionInfo returns the current version information

func RunDaemonCommand added in v0.167.0

func RunDaemonCommand(cfg *config.Config) error

RunDaemonCommand starts the daemon. It hosts up to three subsystems - channels, scheduler, and heartbeat - and starts whichever are enabled. At least one must be enabled or the daemon refuses to boot (otherwise it would just sleep forever).

func StartChatSession added in v0.41.0

func StartChatSession(cfg *config.Config, sessionID string) error

StartChatSession starts a chat session

func StartWebChatSession added in v0.94.0

func StartWebChatSession(cfg *config.Config) error

StartWebChatSession starts a web-based chat session with PTY and WebSocket

func ValidateTool added in v0.41.0

func ValidateTool(cfg *config.Config, command string) error

ValidateTool validates if a command is allowed for execution

Types

type ExternalAgent added in v0.90.2

type ExternalAgent struct {
	Name string
	URL  string
}

ExternalAgent represents an agent configured via INFER_A2A_AGENTS

type FloatingWindowManager added in v0.96.0

type FloatingWindowManager interface {
	Shutdown() error
}

FloatingWindowManager is the platform-specific interface for the floating window

Jump to

Keyboard shortcuts

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