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
//! Action dispatch types for plugins to trigger runtime actions.
//!
//! This module provides the data types that allow asynchronous plugin code
//! (e.g. a spawned task collecting prompt responses) to request the attach
//! loop to execute a [`RuntimeAction`].
//!
//! The actual dispatch channel registration and host machinery lives in
//! `bmux_cli::runtime::action_dispatch` — this module only provides the
//! serializable request type so that plugins can construct dispatch requests
//! without depending on the full CLI crate.
//!
//! [`RuntimeAction`]: https://docs.rs/bmux_keybind/latest/bmux_keybind/enum.RuntimeAction.html
use ;
/// A request to dispatch a runtime action string to the attach loop.
///
/// The `action` field uses the same string format as keybinding action values
/// (e.g. `"focus_next_pane"`, `"plugin:bmux.windows:goto-window 1"`). The
/// attach loop parses the string into a `RuntimeAction` and executes it
/// through the normal dispatch path.
///
/// # Example
///
/// ```ignore
/// use bmux_plugin_sdk::ActionDispatchRequest;
///
/// let request = ActionDispatchRequest::new(
/// "plugin:bmux.plugin_cli:recording-cut --last-seconds 30",
/// );
/// ```