← Back to Pull requests

feat(install): install.sh reports asb's agents, asks for the default agent, and uninstalls them (#6) #386

Closed
unknown closed this pull request without merging on Nov 10, 2026 11:41 UTC
View on GitHub
unknown unknown commented on Nov 10, 2026 11:01 UTC
Author

Fifth of the PRs that make asb install its agents itself (#6): install.sh reports the agents asb installed, asks for the default agent, and uninstalls them.

The agents report. For an agent with an install recipe, one line:

[ok] claude 2.1.321, the pin
[warn] claude 2.1.300, pinned 2.1.321: asb --install claude moves to the pin
[warn] claude: not installed; asb --install claude, or it is offered at the first launch

An agent without a recipe keeps today's PATH line. An install or a re-run never installs, updates or removes an agent and downloads nothing, so a re-run after a new pin only reports it; asb --install AGENT moves to it. The line that told a recipe agent's user to put it on PATH is gone.

The default agent. At a terminal, when asb can run several agents and no default is set, install.sh asks which one is the default:

    asb can run several agents here: 1) claude 2) other
    Which is the default, the one `asb --login` and a role verb run when none is named? [number or name; empty: none for now]

An empty answer leaves it unset. The answer is written by the installed engine, asb --set-default-agent NAME, the one writer. Without a terminal, with --yes, or with a default already set, it does not ask and says the current default and how to change it.

Uninstall now removes the agents asb installed, <state>/<profile>/install/ with every version, listed in the plan beforehand (a symlinked install/ is left alone). The rest of asb's state is kept as before, and the plan now names it: role stores, transcripts, and each account's login under <profile>/accounts/NAME/, with how to remove them.

It also fixes install.sh aborting under a terminal with TERM unset, dumb or vt100: colours are used only when tput can give them.

Docs: README install section, install.sh's header and --help, docs/updating.md, docs/troubleshooting.md, CHANGELOG.

Tests: tests/unit/installer.bats for the report, the question (answers, a real pseudo-terminal, every case where it is not asked) and the uninstall; tests/e2e/install.bats for the report line and an installed agent removed by --uninstall with the state kept. scripts/check.sh and the e2e suite pass locally.

---
_🤖 Drafted by Claude Code (an AI agent) and reviewed & approved by pearu._

Diff: 289 lines (+216 / -73) across 3 files Reviewer: pearu Review duration: 40m
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 289 lines diff across 3 files
0.45
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.339
Shallow Review Depth shallow_review_depth
0.289
Ai Authored ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #386"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 44.8% (MEDIUM) · Higher = larger blast radius
44.8%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 17.7% · Safe to merge
17.7%