pub trait ModeProtocolDriverPlugin: Send + Sync {
// Required methods
fn mode_id(&self) -> &str;
fn build_preamble(&self, input: ModeBuildInput) -> ModePreamble;
}Expand description
Singleton plugin slot that owns the ProtocolDriverHandle and
associated preamble (prompt text, tool surface, sync/async flag)
for a given execution mode. Mode-specific crates
(lash-mode-standard, lash-mode-rlm) register one implementation
each; the runtime picks the one whose mode_id matches the session
policy’s execution mode, falling back to build_mode_preamble
when no plugin claims the slot.
Required Methods§
Sourcefn mode_id(&self) -> &str
fn mode_id(&self) -> &str
Execution-mode identifier this driver implements (e.g.
"standard", "rlm"). Matched against
ExecutionMode::plugin_id() at preamble-build time.
Sourcefn build_preamble(&self, input: ModeBuildInput) -> ModePreamble
fn build_preamble(&self, input: ModeBuildInput) -> ModePreamble
Build the ModePreamble (driver handle + prompt text + tool
surface metadata) for a turn in this mode.