Expand description
Callback type aliases used by the runtime middleware pipeline.
The public middleware registration APIs accept boxed or shared closures with the signatures defined in this module. These aliases centralize those signatures so the runtime can compose tool and LLM middleware consistently across bindings.
Type Aliasesยง
- Event
Subscriber Fn - Consume runtime lifecycle events after they are emitted.
- LlmCollector
Fn - Per-chunk collector used by the streaming LLM runtime.
- LlmConditional
Fn - Decide whether an LLM call is allowed to continue.
- LlmExecution
Fn - Wrap or replace non-streaming LLM execution.
- LlmExecution
Next Fn - Continuation type invoked by non-streaming LLM execution intercepts.
- LlmFinalizer
Fn - Finalizer used to synthesize the aggregate streaming response payload.
- LlmJson
Stream - Stream of JSON chunks produced by the managed streaming LLM pipeline.
- LlmRequest
Intercept Fn - Rewrite or annotate an LLM request before execution.
- LlmSanitize
Request Fn - Sanitize an LLM request before the runtime records it.
- LlmSanitize
Response Fn - Sanitize an LLM response before the runtime records it.
- LlmStream
Execution Fn - Wrap or replace streaming LLM execution.
- LlmStream
Execution Next Fn - Continuation type invoked by streaming LLM execution intercepts.
- LlmStream
Execution Registry Ref - Scope-local registry references passed into streaming execution-chain builders.
- LlmStream
Execution Registry Refs - Slice of scope-local streaming execution registries.
- Tool
Conditional Fn - Decide whether a tool call is allowed to continue.
- Tool
Execution Fn - Wrap or replace tool execution.
- Tool
Execution Next Fn - Continuation type invoked by tool execution intercepts.
- Tool
Intercept Fn - Rewrite tool arguments before execution.
- Tool
Sanitize Fn - Sanitize a tool request payload before the runtime records it.