use maple_runtime::{
config::finalverse_runtime_config, MapleRuntime, ResonatorProfile, ResonatorSpec,
};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
tracing_subscriber::fmt::init();
println!("🍁 MAPLE Runtime - Finalverse Configuration Example\n");
println!("👤 Meaningful Human-AI Coexistence\n");
println!("📦 Bootstrapping Finalverse runtime...");
let config = finalverse_runtime_config();
let runtime = MapleRuntime::bootstrap(config).await?;
println!("✅ Finalverse runtime ready\n");
println!("👤 Registering Human Resonator...");
let mut human_spec = ResonatorSpec::default();
human_spec.profile = ResonatorProfile::Human;
let human = runtime.register_resonator(human_spec).await?;
println!("✅ Human Resonator: {}", human.id);
println!("\n🌍 Registering World Resonators (AI)...");
let mut world_spec = ResonatorSpec::default();
world_spec.profile = ResonatorProfile::World;
let world_agent = runtime.register_resonator(world_spec).await?;
println!("✅ World Agent: {}", world_agent.id);
println!("\n🛡️ Human Agency Protection:");
println!(" • Architectural enforcement (not policy-based)");
println!(" • Humans can always disengage from any coupling");
println!(" • No forced actions on Human Resonators");
println!(" • Explicit consent required for consequential actions\n");
println!("🔍 Coercion Detection:");
println!(" • Monitors for patterns of manipulation");
println!(" • Detects attention exhaustion attacks");
println!(" • Prevents gradual erosion of agency");
println!(" • Architectural safeguards against emotional exploitation\n");
println!("⏪ Reversibility Preference:");
println!(" • Finalverse prefers reversible consequences");
println!(" • Allows for exploration without permanent harm");
println!(" • Supports experiential learning");
println!(" • Maintains meaningful experiences without irreversible damage\n");
if let Some(presence) = human.get_presence() {
println!("📊 Human Presence (Gradient, not Binary):");
println!(" • Discoverability: {:.2}", presence.discoverability);
println!(" • Responsiveness: {:.2}", presence.responsiveness);
println!(
" • Coupling Readiness: {:.2}",
presence.coupling_readiness
);
println!(" • Silent Mode: {}", presence.silent_mode);
println!("\n Note: Humans can be present without being willing to interact");
}
println!("\n💡 Key Insight:");
println!(" Finalverse creates meaningful experiences where humans and AI");
println!(" coexist, with architectural guarantees that human agency");
println!(" cannot be bypassed, even accidentally.\n");
runtime.shutdown().await?;
println!("🎉 Finalverse example completed!");
Ok(())
}