Skip to content

Env-aware Voice Agent URL + grouped --help and Vercel/Supabase-style copy, colors & UX#16

Merged
alexkroman merged 5 commits into
mainfrom
improve-e2e-and-streaming-fixes
Jun 5, 2026
Merged

Env-aware Voice Agent URL + grouped --help and Vercel/Supabase-style copy, colors & UX#16
alexkroman merged 5 commits into
mainfrom
improve-e2e-and-streaming-fixes

Conversation

@alexkroman

Copy link
Copy Markdown
Collaborator

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. Adds agents_host to the frozen Environment, 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

  • Dropped SDK jargon from help one-liners (no more "full TranscriptionConfig/StreamingParameters surface").
  • A fixed affordance vocabulary — success, fail, ! warn, hint — applied across success messages, with next-step hints after login/logout/init/keys create.
  • whoami renders a clean labeled block instead of a key=val dump.
  • doctor renders per-check ✓/!/✗ glyphs under a unified heading.

Colors

  • New aai.url (cyan) for printed URLs — the Vercel/Supabase link look — wired into the login flow and aai init.
  • Success is bold green so reads as a confident "done".

New output helpers (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
  • Full suite: 770 passed, 36 snapshots passed (the 2 updated --help snapshots are the de-jargoned one-liners)
  • Coverage gate (--cov-fail-under=90) holds

🤖 Generated with Claude Code

alexkroman-assembly and others added 5 commits June 5, 2026 07:17
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>
@alexkroman alexkroman merged commit 42a0b58 into main Jun 5, 2026
13 checks passed
@alexkroman alexkroman deleted the improve-e2e-and-streaming-fixes branch June 5, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants