everruns-builtins 0.18.8

Portable, backend-neutral built-in capabilities for Everruns
Documentation
// System Commands Capability
//
// Extension point for built-in /slash commands that execute directly
// without the LLM. Commands will be added here as they are implemented
// (e.g., /clear, /status, /compact).
//
// System commands are surfaced to the UI via the commands() trait method
// and executed via the commands API endpoint.

use super::{Capability, CapabilityLocalization, CapabilityStatus};

/// System commands capability ID
pub const SYSTEM_COMMANDS_CAPABILITY_ID: &str = "system_commands";

/// Built-in system commands capability.
///
/// Provides session-control commands that execute directly without
/// involving the LLM. These appear in the UI command palette.
/// Commands are added as their handlers are implemented.
pub struct SystemCommandsCapability;

impl Capability for SystemCommandsCapability {
    fn id(&self) -> &str {
        SYSTEM_COMMANDS_CAPABILITY_ID
    }

    fn name(&self) -> &str {
        "System Commands"
    }

    fn description(&self) -> &str {
        "Built-in session control commands."
    }

    fn localizations(&self) -> Vec<CapabilityLocalization> {
        vec![CapabilityLocalization::text(
            "uk",
            "Системні команди",
            "Вбудовані команди керування сесією.",
        )]
    }

    fn status(&self) -> CapabilityStatus {
        CapabilityStatus::Available
    }

    fn icon(&self) -> Option<&str> {
        Some("terminal")
    }

    fn category(&self) -> Option<&str> {
        Some("System")
    }
}