claude-agent-service/tests
Viktor Barzin a29bffdda3
Some checks failed
Build and Push / lint-and-test (push) Has been cancelled
Build and Push / build (push) Has been cancelled
Build and Push / deploy (push) Has been cancelled
Build and Push / notify-failure (push) Has been cancelled
chat-completions: stream conversational turns (SSE token relay) for realtime voice
Adds stream=true support to POST /v1/chat/completions (it previously 400'd).
When streaming, it runs the no-tools `conversational` agent via
`claude -p --output-format stream-json --include-partial-messages --verbose`
and relays each content_block_delta as an OpenAI chat.completion.chunk SSE
event, ending with finish_reason=stop + [DONE]. Free CLI/subscription auth, no
tools, no API key.

Stateless by design: the full message history is flattened into the prompt
(prior assistant turns kept), so an OpenAI-style client that re-sends history
each turn — e.g. Pipecat's OpenAILLMService — can stream from us directly. The
non-streaming path (recruiter-triage workspace agent) is unchanged.

This is phase 1 of the Pipecat realtime full-duplex voice-agent rebuild for
portal-assistant (continuous audio, VAD endpointing, barge-in, ~seconds to
first words). New pure helpers (stream_argv/delta_text/openai_chunk/
synthesise_chat_prompt) are unit-tested; the SSE endpoint has a mocked-subprocess
integration test. 429 passing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 22:22:38 +00:00
..
__init__.py Initial extraction from monorepo 2026-05-07 17:07:12 +00:00
conftest.py afk: add the autonomous issue-implementer loop (SHIPS DISABLED) 2026-06-15 21:15:11 +00:00
test_afk_ci_watcher.py afk: add the autonomous issue-implementer loop (SHIPS DISABLED) 2026-06-15 21:15:11 +00:00
test_afk_dispatch_policy.py afk: wire the T3 adapter to the REAL orchestration contract + fix priority 2026-06-15 22:27:00 +00:00
test_afk_notifier.py afk: add the autonomous issue-implementer loop (SHIPS DISABLED) 2026-06-15 21:15:11 +00:00
test_afk_phase_checklist.py afk: add the autonomous issue-implementer loop (SHIPS DISABLED) 2026-06-15 21:15:11 +00:00
test_afk_poller.py afk: wire the T3 adapter to the REAL orchestration contract + fix priority 2026-06-15 22:27:00 +00:00
test_afk_run_state_machine.py afk: add the autonomous issue-implementer loop (SHIPS DISABLED) 2026-06-15 21:15:11 +00:00
test_afk_t3_client.py afk: wire the T3 adapter to the REAL orchestration contract + fix priority 2026-06-15 22:27:00 +00:00
test_afk_t3_live.py afk: wire the T3 adapter to the REAL orchestration contract + fix priority 2026-06-15 22:27:00 +00:00
test_afk_tracker.py afk: add the autonomous issue-implementer loop (SHIPS DISABLED) 2026-06-15 21:15:11 +00:00
test_afk_watcher.py afk: wire the T3 adapter to the REAL orchestration contract + fix priority 2026-06-15 22:27:00 +00:00
test_breakglass.py breakglass UI v2: attachable sessions (tmux model) + mobile-first redesign 2026-06-14 19:19:03 +00:00
test_concurrency.py parallel execution: replace single-flight lock with bounded semaphore + per-job workspace 2026-06-02 20:57:41 +00:00
test_conversational.py chat-completions: stream conversational turns (SSE token relay) for realtime voice 2026-06-17 22:22:38 +00:00
test_main.py parallel execution: replace single-flight lock with bounded semaphore + per-job workspace 2026-06-02 20:57:41 +00:00
test_openai_compat.py chat-completions: stream conversational turns (SSE token relay) for realtime voice 2026-06-17 22:22:38 +00:00