pub mod agent;
pub mod agent_backend;
pub mod agent_files;
pub mod agent_mcp;
pub mod audio;
pub mod cesp;
pub mod chat;
pub mod checkpoint_backfill;
pub mod claude_flags_store;
pub mod claude_help;
pub mod community;
pub mod config;
pub mod db;
pub mod diff;
pub mod env;
pub mod env_provider;
pub mod file_expand;
pub mod file_watcher;
pub mod fork;
pub mod git;
pub mod global_prompt;
pub mod grammar_provider;
pub mod i18n;
pub mod logging;
pub mod mcp;
pub mod mcp_supervisor;
pub mod metrics;
pub mod migrations;
pub mod missing_cli;
pub mod model;
pub mod names;
pub mod ops;
pub mod path;
pub mod permissions;
pub mod plugin;
pub mod plugin_runtime;
pub mod process;
pub mod rpc;
pub mod scheduling;
pub mod scm;
pub mod slash_commands;
pub mod snapshot;
pub mod transport;
pub mod usage;
pub mod workspace_alloc;
pub mod workspace_sync;

use base64::Engine;

pub fn base64_encode(data: &[u8]) -> String {
    base64::engine::general_purpose::STANDARD.encode(data)
}

pub fn base64_decode(encoded: &str) -> Result<Vec<u8>, base64::DecodeError> {
    base64::engine::general_purpose::STANDARD.decode(encoded)
}
