Fix BSD `mktemp` compatibility on macOS: the template must end with the
`X` characters for randomization to work, and `$TMPDIR` already includes
a trailing slash. Without this, the output file is literally named
`deepagents_debug_XXXXXX.txt`.
Support running the install script as root, targeting macOS MDM tools
(Kandji, Jamf, etc.) that execute scripts as root in a minimal
environment. When `id -u` is 0, the script resolves the real console
user's `HOME` and `chown`s all created files back to them. Non-root
installs are completely unaffected — all new code paths either
short-circuit on the root check or define `fix_owner` as a no-op.
Overhaul the CLI's update lifecycle — version checks, auto-upgrade,
install-method detection, and a new `/update` slash command — so users
can stay current without leaving the TUI. The install script also gets a
major quality-of-life pass with colored logging, interactive prompts,
error trapping, and optional ripgrep installation.
## Changes
- Add `detect_install_method()` in `update_check.py` that inspects
`sys.prefix` to distinguish uv, Homebrew, pip, and editable installs —
`upgrade_command()` and `perform_upgrade()` use this to select the right
upgrade path
- Add opt-in auto-update behind `DEEPAGENTS_AUTO_UPDATE` env var or
`[update].auto_update` in `config.toml`; `_check_for_updates` now
auto-upgrades when enabled, otherwise shows an install-method-aware hint
- Add "what's new" banner on first launch after an upgrade via
`should_show_whats_new()` / `mark_version_seen()`, tracked in
`~/.deepagents/seen_version.json`
- Add `/update` slash command (`_handle_update_command`) that checks
PyPI with `bypass_cache=True`, runs the upgrade in-process, and reports
success/failure inline
- Surface `update_available` through `AppResult` so `cli_main` prints an
exit-time update banner when a newer version was detected during the
session
- Rewrite `scripts/install.sh` with colored log helpers, an `EXIT` trap
for actionable failure messages, interactive mode detection (`/dev/tty`
for piped installs), post-install verification (`deepagents -v`), and
optional ripgrep installation via platform package managers with cargo
fallback
- Move `PYPI_URL` and `USER_AGENT` from `update_check.py` to
`_version.py` as canonical constants; narrow bare `except` clauses to
specific exception types throughout `update_check.py`
## Testing
- Add `TestHelpBodyDrift` in `test_command_registry.py` — parses the
`/help` output in `app.py` and asserts every command in the `COMMANDS`
registry appears there, catching future drift between the two
Fixes
- URL to the install script in libs/cli/README.md
## Social handles (optional)
<!-- If you'd like a shoutout on release, add your socials below -->
Twitter: @VinceOPS
---------
Co-authored-by: Mason Daugherty <github@mdrxy.com>
We should keep `langchain-openai` as a required dep, but don't want to
remove an optional group with its name so as to not confuse users.
Consequently, let's make sure their bounds are in sync.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>