Skip to main content

Module builder_ext

Module builder_ext 

Source
Expand description

Builder extension trait for pmcp::ServerBuilder — connects config-driven synthesis (Plans 04, 05, 06) to the public Phase 82 builder API.

Per CONTEXT.md D-10 + D-11, this is the “common path” surface — power users call crate::tools::synthesize_from_config + crate::code_mode::register_code_mode_tools directly. Shape C ≤15-line main.rs users compose this trait.

Per review R7, each method has a panicking convenience form (ServerBuilderExt::tools_from_config, ServerBuilderExt::code_mode_from_config) AND a fallible companion (ServerBuilderExt::try_tools_from_config, ServerBuilderExt::try_code_mode_from_config). The panicking forms delegate to the try_* variants with documented panic messages — production servers should prefer the try_* shape so misconfiguration surfaces as a Result, not a crash.

Traits§

ServerBuilderExt
Composable builder extensions for config-driven pmcp servers.