aa-bridge: public /api/help/chat endpoint (sandboxed, rate-limited)
New POST /api/help/chat sibling of /api/chat, open to any AC user
with a handle rather than the single admin sub. Designed so public
traffic can't spike cost or reach anything sensitive:
- haiku model, stateless spawn (fresh --session-id per request, no
growing transcript to resume)
- --tools "Read Glob Grep" (no Bash/Write/Edit/etc.) + path deny-list
on the vault, every .env/.gpg/.key/.pem/id_rsa/.ssh/.aws and the
bridge's own state dir
- cleaned env on spawn (only PATH/HOME/TERM/SHELL/LANG pass through;
no ADMIN_SUB/AUTH0_* etc. visible to the child)
- 60s wall-clock timeout, cancels on client disconnect
- 3 concurrent max, 20/hour + 50/day per user, 500/day global; all
in-memory, reset on bridge restart
- handle gate: validates bearer, then resolves sub -> @handle via
aesthetic.computer/api/handle?for=<sub> and rejects 403 if unset
- exposes X-Help-Remaining-Hour/Day + Retry-After via
Access-Control-Expose-Headers so the piece can show usage
All tunable via HELP_* env vars.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>