Env-aware Voice Agent URL + grouped --help and Vercel/Supabase-style copy, colors & UX#16
Merged
Merged
Conversation
Several related fixes surfaced while making the e2e suite comprehensive and
running it against the live (sandbox) API.
e2e tests (tests/e2e/test_cli_e2e.py):
- Fix kokoro/torch UserWarnings tripping `filterwarnings = error` (suppress
around pipeline build + synthesis; CLI warnings still surface in subprocess).
- Fix wrong transform assertion: the LLM transform is {model, steps:[{prompt,
output}]}, so assert transform["steps"][0]["output"], not transform["output"].
- Split the summarization + auto-chapters run; the API rejects enabling both.
- Add coverage: basic transcribe, summarization, auto-chapters, sentiment,
diarization, transcripts list->get roundtrip, doctor, and the auth-failure path.
- Skip (don't fail) the voice-agent test when the agent endpoint returns
unauthorized: agent/session.py hardcodes the prod WS URL and isn't env-aware yet.
- Add kokoro to the dev group (marker-gated to Python <3.13) so TTS tests run.
aai usage (aai_cli/commands/account.py):
- Send tz-aware UTC ISO-8601 bounds; bare YYYY-MM-DD made AMS 400 with
"can't compare offset-naive and offset-aware datetimes". Reject invalid
--start/--end with a clean UsageError. Update + extend the usage tests.
Streaming (aai_cli/commands/stream.py):
- Default --speech-model to u3-rt-pro (was universal-streaming-multilingual);
regenerate the help snapshot.
httpx -> httpx2 (Pydantic's maintained fork):
- Switch our code/tests/init templates to httpx2; drop the now-unneeded
TestClient warning filter. test_llm stays on httpx (it feeds the openai SDK).
safe-chain governs the locked version; no evasion caps.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The agent socket URL was hardcoded to wss://agents.assemblyai.com/v1/ws, so a sandbox key (minted by `aai login` against a non-prod env) was rejected at the voice-agent endpoint. Add `agents_host` to the frozen Environment, build the URL from the active environment in agent/session.py, drop the e2e skip that worked around the hardcoded host, and add a test asserting the URL follows the active env (sandbox vs production). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…colors & UX Help organization - Group top-level commands into named Rich panels (help_panels.py), ordered as a journey like the Supabase/Vercel CLIs: Quick Start, Setup & Tools, Transcription & AI, History, Account. - Add a root tagline + getting-started examples epilog. Copywriting - Drop SDK jargon from help one-liners (no more "full TranscriptionConfig / StreamingParameters surface"). - Standardize success messages with a fixed affordance vocabulary (✓ success, ✗ fail, ! warn, › hint) and add next-step hints after login/logout/init/keys. - Render `whoami` as a clean labeled block instead of a key=val dump. - Render `doctor` with per-check ✓/!/✗ glyphs and a unified heading. Colors - Add aai.url (cyan) for printed URLs, matching the Vercel/Supabase link look; wire it into the login flow and `aai init`. - Make success bold green so ✓ reads as a confident "done". New output helpers (success/fail/warn/hint/heading) with unit tests; snapshots and message-asserting tests updated. Errors keep their stderr/`Error:` shape and all JSON output keys are unchanged (backward compatible). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
pip-audit scans the whole environment, so it failed on the runner's own pip (PYSEC-2026-196, fixed in 26.1.2) — not one of our runtime dependencies. Upgrade pip + setuptools before the audit so a toolchain advisory with a one-line fix doesn't red the gate; genuine unfixable transitive advisories still use --ignore-vuln. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This branch lands three things, smallest to largest:
1. Comprehensive e2e tests, u3-rt-pro streaming default, usage fix, httpx2 (
af5e7f4)Pre-existing branch work (see commit).
2. Env-aware Voice Agent WebSocket URL (
e4ce79b)The agent socket URL was hardcoded to
wss://agents.assemblyai.com/v1/ws, so a sandbox key (minted against a non-prod env) was rejected at the voice-agent endpoint. Addsagents_hostto the frozenEnvironment, builds the URL from the active environment, drops the e2e skip that papered over the hardcoded host, and adds a test asserting the URL follows the active env.3. Grouped
--help+ Vercel/Supabase-style copy, colors & UX (21c67d7)A copywriting/UX pass modeled on how the Vercel and Supabase CLIs present themselves.
Help organization — top-level commands are grouped into named Rich panels, ordered as a journey (Supabase-style): Quick Start → Setup & Tools → Transcription & AI → History → Account. Adds a root tagline + getting-started examples.
Copywriting
✓success,✗fail,!warn,›hint — applied across success messages, with next-step hints afterlogin/logout/init/keys create.whoamirenders a clean labeled block instead of akey=valdump.doctorrenders per-check✓/!/✗glyphs under a unified heading.Colors
aai.url(cyan) for printed URLs — the Vercel/Supabase link look — wired into the login flow andaai init.✓reads as a confident "done".New
outputhelpers (success/fail/warn/hint/heading) with unit tests. Errors keep their stderr/Error:shape; all JSON output keys are unchanged (backward compatible).Test plan
ruff check+ruff format --check+mypy(strict) all clean--helpsnapshots are the de-jargoned one-liners)--cov-fail-under=90) holds🤖 Generated with Claude Code