cmd

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentStatusReady             = "ready"
	AgentStatusNotConfigured     = "not_configured"
	AgentStatusConfigError       = "config_error"
	AgentStatusAuthFailed        = "auth_failed"
	AgentStatusSearchUnavailable = "search_unavailable"
)

Agent status values for doctor/context JSON output.

View Source
const (
	StatusValidationError = "validation_error"
	StatusAPIError        = "api_error"
)

Agent-facing status values for non-bootstrap failures.

View Source
const (
	ExitOK              = 0
	ExitGeneral         = 1
	ExitBadArgs         = 2
	ExitNotFound        = 3
	ExitAuth            = 4
	ExitForbidden       = 4
	ExitConfirmRequired = 5
	ExitConflict        = 6
	ExitRateLimit       = 7
	ExitNetwork         = 7
	ExitTimeout         = 8
)

Exit codes for machine-readable error classification.

View Source
const (
	FormatJSON = "json"
	FormatText = "text"
	FormatRaw  = "raw"
)

Variables

View Source
var ErrSilent = errors.New("")

Functions

func Execute

func Execute() error

func ExecuteContext

func ExecuteContext(ctx context.Context) error

func LastExitCode

func LastExitCode() int

Types

type AgentStatus

type AgentStatus struct {
	OK         bool             `json:"-"`
	Status     string           `json:"status"`
	Message    string           `json:"message"`
	Error      string           `json:"error,omitempty"`
	Hint       string           `json:"hint,omitempty"`
	ErrorCode  output.ErrorCode `json:"errorCode,omitempty"`
	StatusCode int              `json:"statusCode,omitempty"`
	ExitCode   int              `json:"exitCode"`
}

AgentStatus is the machine-readable summary every Agent should read first.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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