symfonic.cli.chat¶
chat ¶
symfonic chat — the progressive path, made executable (T4.3.1).
The split-handoff register hands src/symfonic/cli/** to this task with one
instruction: rewired onto facade/kernel in place. The CLI surface is frozen
by T1.3.1's cli-surface golden, so "in place" means the migration cannot
show up as a new flag. It shows up as which runtime executes the turn.
A plain symfonic chat "hi" --tenant-id t1 asks for nothing the platform
owns: no HMS memory, no named domain, no DSN. That invocation now runs through
:class:symfonic.Agent — one required dependency, no FrameworkConfig, no
tenant scope, no background flush. An invocation that does ask for one of
those three keeps SymfonicAgent, because the facade genuinely does not have
them and pretending otherwise would be the silent-drop this refactor exists to
prevent.
Everything here is typer-free so the routing rule can be asserted directly rather than inferred from captured stdout.
ChatError ¶
Bases: RuntimeError
A chat invocation that cannot proceed, with an adopter-facing message.
ChatOutcome
dataclass
¶
ChatOutcome(text: str, runtime: Runtime, system_prompt_tokens: int, memory_entries_used: int, duration_ms: float)
What the turn produced, plus which runtime produced it.
ChatRequest
dataclass
¶
One symfonic chat invocation, decoded off the command line.
build_provider ¶
Resolve --model to a provider instance.
Raises:
| Type | Description |
|---|---|
ChatError
|
for an unknown name, or for a provider whose optional extra
is not installed — with the |
Source code in src/symfonic/cli/chat.py
run_chat
async
¶
Execute one turn on whichever runtime :func:select_runtime picks.
Source code in src/symfonic/cli/chat.py
select_runtime ¶
Return the runtime this invocation needs.
Three things pull an invocation onto the platform agent, and each is a capability the facade does not have rather than a preference:
--enable-hms— the HMS-aware system prompt is a memory capability;--domain <name>— a domain template contributes prompt and tools;--dsn— persistence implies a store the facade never opens.