Documentation
¶
Index ¶
- Variables
- func InstallSkills(backend string) (*skills.MaterializeResult, error)
- func InstallSkillsAll(term *tui.Terminal)
- func InstallSkillsReport(backend string, term *tui.Terminal)
- func IsOrchInstalled(backend string) bool
- func LoginInteractive() (*api.AuthConfig, error)
- func LoginViaBrowser() (*api.AuthConfig, error)
- func PrintSkillsStatus(term *tui.Terminal)
- func PromptAgyGoogleLogin(agyBin string)
- func PromptChoice(prompt string, options []string) int
- func ReadSecret(prompt string) string
- func RunInteractive() (*api.AuthConfig, int, error)
- func RunOrch(backend string, term *tui.Terminal)
- type ConsentResult
- type InstallResult
Constants ¶
This section is empty.
Variables ¶
var ( // ErrStandaloneSkip signals the user chose standalone local mode during // onboarding instead of connecting a QualityMax account. Callers should // switch to standalone mode rather than treating this as a failure. ErrStandaloneSkip = errors.New("standalone local mode selected") // ErrEmptyAPIKey is returned when the API key prompt ends with no input. ErrEmptyAPIKey = errors.New("no API key provided") )
Functions ¶
func InstallSkills ¶
func InstallSkills(backend string) (*skills.MaterializeResult, error)
InstallSkills materializes the qmax QA skill catalog into the backend's native skills directory (~/.claude/skills or ~/.codex/skills). It is idempotent and refreshes the catalog on every call, so existing users pick up new or updated skills on upgrade.
It is deliberately decoupled from RunOrch's one-time MCP install: the MCP entry is written once (guarded by IsOrchInstalled), but skills must keep syncing on every activation/upgrade — otherwise anyone who already had the MCP installed would never receive the skill catalog.
func InstallSkillsAll ¶
InstallSkillsAll materializes the catalog into every supported CLI backend and reports each. Used by the `/skills install` command.
func InstallSkillsReport ¶
InstallSkillsReport runs InstallSkills and reports the outcome to the terminal. Non-fatal: skills are additive, so a failure is surfaced but does not block backend activation.
func IsOrchInstalled ¶
IsOrchSetupDone returns true if the qmax MCP entry already exists in the CLI's config file. Used to skip the setup banner on subsequent launches.
func LoginInteractive ¶
func LoginInteractive() (*api.AuthConfig, error)
LoginInteractive prompts the user to paste their API key.
func LoginViaBrowser ¶
func LoginViaBrowser() (*api.AuthConfig, error)
LoginViaBrowser performs Railway-style browser login:
- POST /api/auth/cli-login → get code + auth URL
- Open browser to auth URL
- Poll /api/auth/cli-poll until authorized or expired
- Exchange the user access token for a registered API token that works with both the REST API and the cloud MCP endpoint
func PrintSkillsStatus ¶
PrintSkillsStatus lists the qmax QA skill catalog and shows, per skill, whether it is currently materialized into the Claude Code, Codex, and opencode skills directories. Backs the `/skills` command so the catalog is visible from inside qmax-code, even though the skills themselves run in the CLI backends.
func PromptAgyGoogleLogin ¶
func PromptAgyGoogleLogin(agyBin string)
PromptAgyGoogleLogin offers to launch Antigravity's Google OAuth flow. agy 1.1.x has no `auth login` subcommand: Google sign-in runs when the interactive CLI starts with no cached token. An AI Studio API key is not required. Skipped when stdin is not a TTY, when a file-backed OAuth token is already present, or when this process already offered the prompt.
func PromptChoice ¶
PromptChoice shows an interactive menu and returns the selected index. On a TTY it renders an arrow-key chooser (↑/↓ or j/k to move, Enter to confirm, digits 1-9 to select directly). When raw mode is unavailable (piped stdin, CI), it falls back to the numeric prompt.
func ReadSecret ¶
ReadSecret reads a line of input with characters hidden (replaced with dots). Shows a masked preview after completion.
func RunInteractive ¶
func RunInteractive() (*api.AuthConfig, int, error)
RunInteractive guides a first-time user through login and project selection. It returns failures to main so the session receipt can be finalized before the process exits.
Types ¶
type ConsentResult ¶
type ConsentResult struct {
Proceed bool // user said yes; false means cancel activation
PermissionMode string // "standard" | "unattended"
GlobalInstall bool // ok to write into ~/.claude/settings.json or ~/.codex/config.toml
}
ConsentResult is what activateBackend gets back from the consent prompt.
func PromptOrchConsent ¶
func PromptOrchConsent(cfg *api.Config, backend string) ConsentResult
promptOrchConsent shows the autonomy + global-install dialog the first time a CLI backend is activated. If the user already chose persistently (cfg.OrchPermissionMode / cfg.OrchGlobalInstall) we skip the prompt.
Conductor's safety model: the user is the principal. We never sneak privilege escalation behind a backend switch. Mode choices are explicit and persisted.
type InstallResult ¶
InstallResult describes what autosetup did so the caller can display it.
func InstallAgy ¶
func InstallAgy() (*InstallResult, error)
InstallAgy writes the qmax MCP server into ~/.gemini/config/mcp_config.json so Antigravity CLI picks up qmax tools in ordinary `agy` sessions as well as sessions launched by qmax-code. agy has no per-invocation --mcp-config flag.
func InstallCC ¶
func InstallCC() (*InstallResult, error)
SetupCCIntegration writes the qmax MCP server into ~/.claude/settings.json so Claude Code picks up qmax tools in EVERY session — not just when spawned by qmax-code. This gives CC full bidirectional capability inheritance:
- CC gets all qmax QA tools (list, run, generate, crawl, review…)
- When qmax-code is the host, CC's own tools (bash, file ops, web) are also fully active and the system prompt instructs CC to use both.
func InstallCodex ¶
func InstallCodex() (*InstallResult, error)
SetupCodexIntegration writes the qmax MCP server into ~/.codex/config.toml so Codex picks up qmax tools whenever the user invokes `codex` directly, in addition to when qmax-code spawns it.