Test
Merged
SW
4mo ago+1155+1155+0123456789012345678901234567890123456789-772-772-012345678901234567890123456789
Summary by cubic
Moved chat generation to an async runs API backed by the durable runAgentWorkflow. Adds run status checks, per-run ephemeral recoup_sk_ keys, and shared provisioning so interactive and headless paths behave the same.
-
New Features
- POST
/api/chat/runs: provisions a session + sandbox, mints a short‑lived account‑scopedrecoup_sk_key (~15m TTL), startsrunAgentWorkflow, and returns 202 with{ runId, chatId, sessionId }and aLocationheader. The workflow revokes the key on completion; auth rejects expired keys. - GET
/api/chat/runs/{runId}: returns{ runId, status }normalized toqueued|running|completed|failed|cancelled.
- POST
-
Migration
- Removed POST
/api/chat/generate. Use POST/api/chat/runs, read output via GET/api/chat/{chatId}/stream, and poll GET/api/chat/runs/{runId}for status. - Request body no longer supports
topic,roomId, orexcludeTools. The default model isanthropic/claude-haiku-4.5.
- Removed POST