M0.6: command registry, guard, theme tokens, app.about and app.quit

Command trait with static spec, enabled check and run; Registry rejects
duplicate ids; Engine::execute runs every command inside the guard, which
turns panics into EngineError::Internal and keeps the engine usable.
Effects (Quit) are applied by the host. Theme tokens for Lutra Dark and
Lutra Light render as --lt-* CSS variables and a webview init script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-10-14 06:40:15 +02:00
parent 50bcc95006
commit b382f9fae7
12 changed files with 758 additions and 1 deletions

View file

@ -1,4 +1,21 @@
//! Engine of Lutra (layer L4).
//!
//! Owns the command registry, the workspace state, the panic guard around every
//! entry point and the crash-recovery journal.
//! entry point and the crash-recovery journal. Every user-visible action is a
//! [`Command`]; menus, the palette, shortcuts, the CLI, the control channel and
//! MCP all reach it through [`Engine::execute`].
pub mod cmd;
mod command;
mod engine;
mod error;
pub mod guard;
mod registry;
mod state;
pub mod theme;
pub use command::{Command, CommandInfo, CommandSpec, Effect, Outcome};
pub use engine::Engine;
pub use error::{EngineError, ErrorPayload};
pub use registry::Registry;
pub use state::State;