Documentation
¶
Overview ¶
Ask progress streaming (ADR-0040 L2): while a `ghx sidecar ask` turn runs (40–106s), the caller previously saw nothing until the full report landed. The session's live.jsonl (ADR-0022.1) already carries turn activity as it happens — this file tails it and renders compact progress lines on STDERR, so first useful evidence is visible within seconds instead of after the whole turn. STDOUT stays reserved for the final report / --json envelope (ADR-0019.3 D2: streaming is human decoration only; machine surfaces are untouched).
Rendering rules (docs/research/006-l2-streaming-ux-states.md):
- one scannable line per event, newest-wins; repeats of an identical line collapse (the FRICTION.md ~48×`(pending)` pathology cannot recur);
- pending tool updates render nothing — they carry no new information beyond the tool.call line already shown;
- a >3s event gap derives ONE static "thinking…" / "synthesizing… (N sources so far)" line — never a fabricated activity name;
- non-TTY stderr gets the same information without glyphs, behind a "# " prefix scripting agents can grep.
Index ¶
Constants ¶
const ( // ExitOK is returned by successful commands. ExitOK = 0 // ExitNoResults means the command ran correctly but found no matching data. ExitNoResults = 1 // ExitBadInvocation means arguments or flags were invalid. ExitBadInvocation = 2 // ExitUpstreamFailure means GitHub, gh auth, or another upstream dependency failed. ExitUpstreamFailure = 3 )
Variables ¶
var MCPSkillMD string
var ReconSkillMD string
var RootCmd = &cobra.Command{ Use: "ghx", Short: "GitHub code exploration for agents and humans", Long: `ghx — GitHub code exploration for agents and humans Exit codes: 0 ok 1 no results 2 bad invocation 3 upstream/API failure`, Version: VERSION, Example: ` ghx --version ghx explore gkoreli/ghx ghx read gkoreli/ghx cmd/ghx/main.go --lines 1-40`, Run: func(cmd *cobra.Command, args []string) { if len(args) == 0 { cmd.Help() } }, }
var SkillMD string
var VERSION = "dev"
Functions ¶
func CodeForError ¶ added in v2.3.0
CodeForError returns the semantic exit code for err. A CLI ExitError set by a handler wins (it is the deliberate, final mapping); otherwise the FailureClass a core ghx.Error carries is honored; an unclassified error is a bad invocation.
func WithExitCode ¶ added in v2.3.0
WithExitCode marks err with the semantic CLI exit code.
Types ¶
type ExitError ¶ added in v2.3.0
ExitError carries the process exit code for a CLI failure.
type HTTPTransport ¶
type HTTPTransport struct {
Address string
}
HTTPTransport implements Transport for streamable HTTP communication
type StdioTransport ¶
type StdioTransport struct{}
StdioTransport implements Transport for stdio communication