1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! 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.
;