Expand description
Command dispatch — the single execution path for all commands.
The CommandDispatcher trait defines how a single command is resolved and
executed. The Kernel implements this trait with the full dispatch chain:
user tools → builtins → .kai scripts → external commands → backend tools.
PipelineRunner calls dispatcher.dispatch() for each command in a
pipeline, handling I/O routing (stdin piping, redirects) around each call.
Stmt::Command ──┐
├──▶ execute_pipeline() ──▶ PipelineRunner::run(dispatcher, commands, ctx)
Stmt::Pipeline ──┘ │
for each command:
dispatcher.dispatch(cmd, ctx)
│
┌─────┼──────────────┐
│ │ │
user_tools builtins .kai scripts
external cmds
backend toolsStructs§
- Backend
Dispatcher - Fallback dispatcher that routes through
backend.call_tool().
Enums§
- Pipeline
Position - Position of a command within a pipeline.
Traits§
- Command
Dispatcher - Trait for dispatching a single command through the full resolution chain.