diff --git a/Makefile b/Makefile index fb00b8a17..aae8b269d 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ export PATH := $(HOME)/.local/bin:$(HOME)/.cargo/bin:$(PATH) # "Entering/Leaving directory" line around every sub-invocation. MAKEFLAGS += --no-print-directory -.PHONY: help setup install run run-fg stop restart logs status check-stopped test lint build-frontend setup-chrome pick-model doctor +.PHONY: help setup install run run-fg stop restart logs status check-stopped test lint build-frontend setup-chrome pick-model doctor refresh-codex # tmux session Condor runs in SESSION := condor @@ -24,18 +24,19 @@ endef help: @echo "Condor - Available Commands" @echo "" - @echo " make setup - Interactive setup wizard" - @echo " make pick-model - Choose the AI model Condor thinks with" - @echo " make install - Setup + install all dependencies" - @echo " make run - Start Condor in the '$(SESSION)' tmux session" - @echo " make run-fg - Run in the foreground (debugging)" - @echo " make logs - Attach to the session (detach: Ctrl+B then D)" - @echo " make stop - Stop Condor" - @echo " make restart - Stop and start again" - @echo " make status - Is Condor running?" - @echo " make doctor - Verify dependencies, config, and Hummingbot API access" - @echo " make test - Run tests" - @echo " make lint - Run black + isort" + @echo " make setup - Interactive setup wizard" + @echo " make pick-model - Choose the AI model Condor thinks with" + @echo " make refresh-codex - Update the Codex ACP bridge and its bundled CLI" + @echo " make install - Setup + install all dependencies" + @echo " make run - Start Condor in the '$(SESSION)' tmux session" + @echo " make run-fg - Run in the foreground (debugging)" + @echo " make logs - Attach to the session (detach: Ctrl+B then D)" + @echo " make stop - Stop Condor" + @echo " make restart - Stop and start again" + @echo " make status - Is Condor running?" + @echo " make doctor - Verify dependencies, config, and Hummingbot API access" + @echo " make test - Run tests" + @echo " make lint - Run black + isort" setup: @chmod +x setup-environment.sh && ./setup-environment.sh @@ -43,6 +44,21 @@ setup: pick-model: uv run python -m condor.setup_llm +refresh-codex: + @if ! command -v npm >/dev/null 2>&1; then \ + export NVM_DIR="$$HOME/.nvm"; \ + if [ -s "$$NVM_DIR/nvm.sh" ]; then \ + . "$$NVM_DIR/nvm.sh"; \ + fi; \ + fi; \ + command -v npm >/dev/null 2>&1 || { \ + echo "npm not found. Install Node.js or configure nvm."; \ + exit 1; \ + }; \ + npm install -g @agentclientprotocol/codex-acp@latest && \ + npm list -g @agentclientprotocol/codex-acp @openai/codex --depth=1 && \ + echo "Start a new Codex session in Condor to use the updated bridge." + install: setup uv sync --dev @bash -c ' \ diff --git a/README.md b/README.md index 9b6ebf0c3..ba849de77 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,7 @@ The following applies after **Install Condor**. If you used **Install only Hummi - In Telegram, use **`/servers`** for Hummingbot API URLs and auth, **`/keys`** for exchange credentials, and **`/gateway`** for DEX setup (or **`/start`** for the setup shortcuts) so commands like `/portfolio` and `/trade` can reach your stack. - If Condor and the API are on **different machines**, install [Tailscale](https://tailscale.com/download) on the Condor host and add the API in **`/servers`** with host **`hummingbot-api`** (not a public IP). See [Secure Connection via Tailscale](#secure-connection-via-tailscale) below. - **Check the install:** `make doctor` re-verifies dependencies, `.env`/`config.yml`, the AI model, the dashboard's network binding, Tailscale, and whether every configured Hummingbot API server is actually reachable and authenticating. Run it any time something stops working — it is read-only. +- **Refresh Codex:** If a newer model fails because the Codex ACP bridge is outdated, run `make refresh-codex` to update the bridge and its bundled Codex CLI, then start a new Codex session in Condor. Existing sessions keep the bridge they already started. - If something fails, see **Troubleshooting** below. ## Local mode (no Telegram)