objectiveai_mcp_plugin_framework/lib.rs
1//! The ObjectiveAI MCP plugin framework.
2//!
3//! Written on ONE assumption: a plugin runs inside ObjectiveAI. The
4//! laboratory host gives it a container per completion, a single
5//! connector, and its whole context in the environment — so the
6//! framework reads that context once, directly, rather than making
7//! every plugin rediscover it.
8
9pub mod command_executor;
10pub use command_executor::command_executor;
11pub mod config;
12pub mod db;
13mod environment;
14pub use environment::*;
15pub mod serve;
16pub mod tools;
17
18/// Re-exported so a plugin uses the SAME `objectiveai_sdk`, `rmcp` and
19/// `sqlx` the executor, router and pool came from. Depending on any of
20/// them separately risks two versions in one binary, where a `Pool`, a
21/// `ToolRouter` or a `CommandExecutor` from here would not satisfy an
22/// API from there.
23///
24/// The SDK matters most: every `cli::command::*::execute` is generic
25/// over the `CommandExecutor` TRAIT, so a separately-resolved SDK
26/// makes [`command_executor`]'s return type implement a different
27/// trait of the same name, and the call simply will not compile.
28pub use {objectiveai_sdk, rmcp, sqlx};