Documentation
¶
Index ¶
Constants ¶
const ( ExitOK = 0 ExitRunFailed = 1 ExitUsage = 2 ExitREPLNotReady = 3 )
Exit codes returned via os.Exit across ape commands. Single source of truth (PLAN-9 F3.4) so the meaning of a code is uniform command to command; each command's Long help documents which codes it can produce. The table starts from the shipped `ape task` convention (PLAN-11); PLAN-17 registers its reporting codes here.
0 success 1 the operation ran but failed — a skill exited non-zero, the Stop-hook wait errored, or the idle-without-Stop timeout fired 2 usage or preflight error — bad flags, unknown skill/pipeline, or the dirty-tree gate; detected before any claude process spawns 3 the claude REPL never became ready inside the PTY — the trust-dialog dismissal failed or an unknown modal blocked input; the last pane snapshot is written to stderr for diagnosis
Variables ¶
var ( Version = "dev" BuildDate = "unknown" GitCommit = "unknown" )
Functions ¶
Types ¶
type CheckResult ¶ added in v0.0.18
type CheckResult struct {
Name string `json:"name" yaml:"name"`
Status DoctorStatus `json:"status" yaml:"status"`
Message string `json:"message" yaml:"message"`
Remediation string `json:"remediation,omitempty" yaml:"remediation,omitempty"`
FixCommand string `json:"fix_command,omitempty" yaml:"fix_command,omitempty"`
DurationMs int64 `json:"duration_ms" yaml:"duration_ms"`
}
CheckResult is the structured outcome of a single doctor probe.
type DoctorReport ¶ added in v0.0.18
type DoctorReport struct {
Checks []CheckResult `json:"checks" yaml:"checks"`
Summary DoctorSummary `json:"summary" yaml:"summary"`
}
DoctorReport is the top-level structured output of `ape doctor`.
type DoctorStatus ¶ added in v0.0.18
type DoctorStatus string
DoctorStatus is the per-check verdict in the doctor report.
const ( StatusOK DoctorStatus = "ok" StatusWarn DoctorStatus = "warn" StatusFail DoctorStatus = "fail" StatusSkip DoctorStatus = "skip" StatusInfo DoctorStatus = "info" )
type DoctorSummary ¶ added in v0.0.18
type DoctorSummary struct {
OK int `json:"ok" yaml:"ok"`
Warn int `json:"warn" yaml:"warn"`
Fail int `json:"fail" yaml:"fail"`
Skip int `json:"skip" yaml:"skip"`
Info int `json:"info" yaml:"info"`
}
DoctorSummary aggregates per-status counts for quick CI consumption.
type PipelineFlags ¶ added in v0.0.11
PipelineFlags bundles the UI selector flags consumed by resolvePipelineMode. Grouped so the resolver signature stays stable as new UI flags land.
type PipelineMode ¶ added in v0.0.11
type PipelineMode int
PipelineMode is the resolved UI mode for a pipeline invocation. ape is PTY-only since v0.0.36 (PLAN-9 F2 removed the programmatic `claude -p` exec axis and the LOCKED `--eval` mode), so the only remaining dimension is where output renders. Every mode executes claude in the interactive per-stage in-process PTY (internal/repl).
const ( // PipelineModeTUIInteractive is the default: Bubble Tea TUI // rendering. Equivalent to `ape pipeline <name>` with no UI flag. PipelineModeTUIInteractive PipelineMode = iota // PipelineModeWebInteractive is `--web`: bridged web UI rendering. PipelineModeWebInteractive // PipelineModeNoneInteractive is `--no-tui`: no UI surface, plain // stdout progress lines. PipelineModeNoneInteractive )
func (PipelineMode) HasUI ¶ added in v0.0.11
func (m PipelineMode) HasUI() bool
HasUI reports whether the mode uses an interactive UI surface (TUI or web). False for the plain-stdout `--no-tui` mode.
func (PipelineMode) IsTUI ¶ added in v0.0.11
func (m PipelineMode) IsTUI() bool
IsTUI reports whether the mode renders via Bubble Tea.
func (PipelineMode) IsWeb ¶ added in v0.0.11
func (m PipelineMode) IsWeb() bool
IsWeb reports whether the mode renders via the web broker.
Source Files
¶
- adr.go
- bootstrap.go
- chat.go
- costs.go
- doctor.go
- doctor_checks.go
- exitcodes.go
- framework.go
- gendocs.go
- mcp_bridge.go
- notify.go
- pattern.go
- pipeline.go
- pipeline_interactive.go
- pipeline_interactive_tui.go
- pipeline_modes.go
- pipeline_web.go
- planning_help.go
- rollback.go
- root.go
- runtime.go
- sessions.go
- sync.go
- task.go
- trait.go
- update.go
- validate_util.go
- version.go
- web_adapter.go