SPB Git forge

spb/wp13_uqo

Public
3commits 1branches 1releases
1.2 MBsize
maindefault branch
1 h agolast push
TeX 93.9% Python 6%
1.7 KB · 32 lines latex
Raw Blame History
1\begin{table}[htbp]2\centering3\caption{Provider-side streaming event protocol. The server parses the provider's Server-Sent4Event stream and dispatches on each event's type; it then re-emits its own typed events to the5client (Appendix~\ref{app:events}). This is the mechanism by which reasoning, text, tool calls, and6computed artifacts are surfaced incrementally.}7\label{tab:events}8\begin{threeparttable}9\small10\begin{tabular}{@{}lll@{}}11\toprule12Provider event & Sub-type & Server action \\13\midrule14\texttt{message\_start}       & ---                  & read input and output token usage \\15\texttt{message\_delta}       & ---                  & update running output-token count \\16\texttt{content\_block\_start}& \texttt{tool\_use}   & open a new tool call (name, identifier) \\17\texttt{content\_block\_delta}& \texttt{text\_delta} & append to answer; forward to client \\18\texttt{content\_block\_delta}& \texttt{thinking\_delta} & forward reasoning summary on a separate channel \\19\texttt{content\_block\_delta}& \texttt{input\_json\_delta} & concatenate partial tool-argument JSON \\20\texttt{content\_block\_stop} & ---                  & parse accumulated JSON into tool arguments \\21\texttt{message\_stop}        & ---                  & reconcile output tokens; resolve the call \\22\bottomrule23\end{tabular}24\begin{tablenotes}[flushleft]25\footnotesize26\item \textit{Notes.} Source: \path{server/services/claudeService.ts}. The client performs the27symmetric operation on the server's own stream: it reads bytes, splits on newlines retaining the28trailing partial line, and dispatches the server's event types to dedicated renderers.29\end{tablenotes}30\end{threeparttable}31\end{table}32