createCutStreamRetryMiddleware
createCutStreamRetryMiddleware(
onCut?):AgentMiddleware<undefined,undefined,unknown, readonly (ClientTool|ServerTool)[], readonly []>
Defined in: packages/core/src/core/cutStreamRetry.ts:151
Build the retry middleware. See the module comment for the argument.
Parameters
Section titled “Parameters”onCut?
Section titled “onCut?”(reason) => void
Records the stream_cut reason on the agent when the retry is cut as well. Called
before the throw, so the agent’s first-write-wins record holds it whatever a later site notes.
Returns
Section titled “Returns”AgentMiddleware<undefined, undefined, unknown, readonly (ClientTool | ServerTool)[], readonly []>