Mint a fresh test-type v2 conversation bound to an agent or team
conv_* replacement for the retired POST /v1/runtime/test-chat.
Mints a session_type="test" Conversation on the chat channel /
dashboard surface (ADR-001 — the operator initiated it, so
origin="outbound"). Identity is
per body.test_features.identity_resolution (default off): off binds a throwaway
random end_user_id with no identity-graph call; on binds the authenticated
caller’s resolved internal:<clerk_user_id> EndUser. The test discriminator
still gates memory sync / summary generation / extraction / evaluations /
knowledge-gap analysis per the resolved snapshot (src.conversation.test_features),
so a feature-off test session remains as ephemeral as before. The dashboard “Try
this …” panel then drives turns via POST /conversations/{id}/turns/stream
passing the returned id.
Binds to exactly one of a single Assistant (agent_id) or a Team
(team_id + optional team_revision_id); the request schema enforces
that XOR. Either way the bound entity is resolved + org-scoped BEFORE the
conversation is created (get_agent_for_runtime / get_team_for_org
both raise 404 for a missing or cross-org id), so a bare test row can never
bind to another org’s agent/team.
For a team, team_revision_id defaults to the team’s
active_revision_id when omitted; bootstrap_team_conversation binds the
team revision. Under DD-5 the roster resolves LIVE per turn (member pin, else
live active revision) — it is not pinned at bind. No first greeting: the
legacy endpoint emitted none, so there is nothing to replicate here.
Authorizations
Body
Mint a fresh session_type="test" chat session for the dashboard.
The agent-detail Test chat panel uses this. Identity is controlled by
test_features.identity_resolution (default off): off mints a throwaway
random end_user_id with NO identity-graph call, so dev-side Neo4j churn
(wipes, merges, deletes) can never strand the panel with a stale uid; on,
the session binds to the authenticated dashboard member's resolved
internal:<clerk_user_id> EndUser, and every "Reset" / "End session"
still mints a fresh Conversation row but reuses that same identity.
Mirrors POST /v1/voice/web-call for text/API.
Bind to exactly one of a single Assistant (agent_id) or a Team
(team_id + optional team_revision_id) — the same single-XOR-team
invariant the runtime conversations table enforces. When team_id is
given without team_revision_id, the handler resolves the team's active
revision.
Test-session feature toggles. Omitted means all off. The resolved snapshot is echoed back as test_features on TestChatStartResponse.