symfonic.agent.fastapi.native_stream_guard¶
native_stream_guard ¶
Shared admission and observed-usage guard for native SSE projections.
RawUsageGuard ¶
admit_native_stream ¶
admit_native_stream(agent: Any, tenant_id: str, query: str, *, human: Any = None) -> NativeStreamAdmission
Admit a stateless stream and pin a priced plan for budgeted turns.
human admits exactly that composed human-interaction capability as
well; only the selected typed stream with guarded durable resume passes it.
Source code in src/symfonic/agent/fastapi/native_stream_guard.py
native_stream_source ¶
native_stream_source(agent: Agent, invocation: Any, session_id: str, prepared_plan: Any, history: tuple[Any, ...] = ()) -> Any
Use one admitted plan for execution; keep the regular unbudgeted path.
history must come from an authority that verified the session owner,
never from the request body.