Skip to main content

Module ghola_offer

Module ghola_offer 

Source
Expand description

§Ghola install offer

Asks the user before installing the Ghola sidecar, and before leaving a sidecar that scope started running.

Scope never installs on its own. It asks:

  • when a command builds its transport with ghola.enabled, no sidecar answers and no ghola binary is found (once: a “no” is remembered);
  • in the setup wizard.

setup --status only suggests it. A run that cannot answer never gets the question: --yes, JSON / CSV / Markdown output, a pipe, the web API and the TUI pane keep the native fallback and print how to install.

The install itself is scope::http::ghola_install: the latest GitHub release, its SHA-256 checked against checksums.txt before anything is extracted, into ~/.scope-bca/bin.

Structs§

Installer
What an install needs.

Functions§

finish_sidecar
Stops the sidecar this run started, or leaves it running when the user says so. With ask, the user has 15 seconds to answer; no answer stops it. Without ask it is stopped.
may_ask
True when this run may ask the user: a terminal on stdin, stdout and stderr, outside the TUI and the web server.
offer_for_transport
The transport’s offer: asks once (a “no” is remembered in the state folder) and installs on a yes. Returns the installed binary.
offer_install
Asks whether to install Ghola and installs it on a yes. Returns the installed binary.
process_args
The process arguments, for scripted.
scripted
True when the run is scripted: --yes, --ai, or JSON, CSV or Markdown output (from the flags or the config). Such a run never asks.
with_local_installer
Runs f with an installer for this machine: GitHub releases, into ~/.scope-bca/bin.