fret_runtime/action.rs
1use crate::{CommandId, CommandMeta, CommandRegistry};
2
3/// Stable action identifier (v1).
4///
5/// v1 compatibility strategy (ADR 0307): `ActionId` is an alias over `CommandId` so we can adopt
6/// action-first authoring without keymap schema churn.
7pub type ActionId = CommandId;
8
9/// Action metadata (v1).
10///
11/// v1 strategy (ADR 0307): action metadata is the existing command metadata surface.
12pub type ActionMeta = CommandMeta;
13
14/// Action registry (v1).
15///
16/// v1 strategy (ADR 0307): action metadata is stored in the existing command registry.
17pub type ActionRegistry = CommandRegistry;
18
19/// Typed unit action marker type (v1).
20///
21/// This trait is intentionally minimal: it maps a Rust marker type to a stable [`ActionId`].
22/// v1 standardizes on unit actions only (no structured payload).
23pub trait TypedAction: 'static {
24 fn action_id() -> ActionId;
25}