Documentation
¶
Index ¶
- Constants
- Variables
- func ExecTool(cfg *config.Config, args []string, format string) error
- func Execute()
- func GetProjectFlag(cmd *cobra.Command) bool
- func GetVersionInfo() domain.VersionInfo
- func RunAgentCommand(cfg *config.Config, modelFlag, taskDescription string, files []string, ...) (err error)
- func RunChannelsCommand(cfg *config.Config) error
- func StartChatSession(cfg *config.Config, sessionID string) error
- func StartWebChatSession(cfg *config.Config) error
- func ValidateTool(cfg *config.Config, command string) error
- type AgentSession
- type ConversationMessage
- type ExternalAgent
- type FloatingWindowManager
Constants ¶
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 ¶
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 GetProjectFlag ¶ added in v0.126.0
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 RunAgentCommand ¶ added in v0.41.0
func RunChannelsCommand ¶ added in v0.101.0
RunChannelsCommand starts the channel listener daemon. The daemon 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
StartChatSession starts a chat session
func StartWebChatSession ¶ added in v0.94.0
StartWebChatSession starts a web-based chat session with PTY and WebSocket
Types ¶
type AgentSession ¶ added in v0.36.0
type AgentSession struct {
// contains filtered or unexported fields
}
AgentSession manages the background execution session
type ConversationMessage ¶ added in v0.36.0
type ConversationMessage struct {
Role string `json:"role"`
Content string `json:"content"`
ReasoningContent string `json:"reasoning_content,omitempty"`
ToolCalls *[]sdk.ChatCompletionMessageToolCall `json:"tool_calls,omitempty"`
Tools []string `json:"tools,omitempty"`
ToolCallID string `json:"tool_call_id,omitempty"`
Failed bool `json:"failed,omitempty"`
ToolExecution *domain.ToolExecutionResult `json:"-"`
TokenUsage *sdk.CompletionUsage `json:"token_usage,omitempty"`
Timestamp time.Time `json:"timestamp"`
RequestID string `json:"request_id,omitempty"`
Internal bool `json:"-"`
Images []domain.ImageAttachment `json:"images,omitempty"`
}
ConversationMessage represents a message in the JSON output conversation
type ExternalAgent ¶ added in v0.90.2
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
Source Files
¶
- agent.go
- agent_agui.go
- agents.go
- channels.go
- chat.go
- config.go
- config_getset.go
- conversation_title.go
- conversations.go
- debug.go
- defaults.go
- env.go
- export.go
- floating_window_stub.go
- gpu.go
- init.go
- keybindings.go
- mcp.go
- migrate.go
- plans.go
- plugins.go
- root.go
- skills.go
- stats.go
- status.go
- table.go
- tools.go
- traces.go
- version.go
- version_info.go