elicit_bevy 0.11.1

Elicitation-enabled Bevy ECS tools for code generation and game development
Documentation
//! Bevy state wrappers.
//!
//! The [`States`](bevy::state::state::States) trait is user-defined. Any type
//! deriving `States` can be registered with the Bevy app and transitioned via
//! [`NextState<S>`](bevy::state::state::NextState).
//!
//! Use the `StatesTools` factory from
//! `trait_factories.rs` to expose state transitions for any concrete state type.
//!
//! ## Schedules: `OnEnter` / `OnExit` / `OnTransition`
//!
//! These are schedule labels generated by Bevy's state plugin. They are not
//! wrappable as MCP values; document them in agent instructions instead.
//!
//! ## `NextState<S>` and `State<S>`
//!
//! Both are generic over the user state type `S` and cannot be wrapped as a
//! single concrete MCP type. Agents that need to trigger a state transition
//! should call the Bevy ECS system `NextState::set(state)` through the Phase
//! 3C workflow plugin.
//!
//! ## Pattern for MCP-accessible state types
//!
//! ```rust,ignore
//! #[derive(States, Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, JsonSchema)]
//! pub enum AppState { Loading, InGame, Paused }
//!
//! // At server startup:
//! prime_bevy__state__state__states::<AppState>();
//! registry.register_type::<AppState>("app_state").await;
//! ```

/// Marker documenting the `States` trait pattern for MCP tooling.
///
/// This struct is not a wrapper around a Bevy type.  It exists so that the
/// module is non-empty and provides a stable re-export surface for doc-tests.
///
/// For concrete state transitions, register your `States` type with the
/// `StatesTools` factory.
pub struct StateTransitionDoc;

impl StateTransitionDoc {
    /// Returns a description of the `States` pattern for MCP agents.
    pub fn describe() -> &'static str {
        "State transitions require a concrete States type registered at startup. \
         Use StatesTools factory and prime_bevy__state__state__states::<S>()."
    }
}