Skip to main content

Crate maple_runtime

Crate maple_runtime 

Source
Expand description

§MAPLE Resonance Runtime

The foundational AI framework for Mapleverse, Finalverse, and iBank.

§Overview

MAPLE (Multi-Agent Platform for Learning and Evolution) is a world-class multi-agent AI framework built entirely on Resonance Architecture principles.

Unlike traditional agent frameworks (Google A2A, Anthropic MCP) that treat agents as isolated processes communicating via messages, MAPLE treats every entity as a Resonator participating in continuous, stateful resonance.

§Key Features

  • Resonance-Native: Built from the ground up on presence → coupling → meaning → intent → commitment → consequence
  • 8 Architectural Invariants: Compile-time and runtime enforced safety guarantees
  • Attention Economics: Prevents runaway resource consumption and coercive patterns
  • Commitment Accountability: Every consequential action is attributable and auditable
  • Human Agency Protection: Architectural, not policy-based, safeguards

§Architecture

Traditional: Agent A --[message]--> Agent B --[message]--> Agent C

MAPLE:      Resonator A <==[coupling]==> Resonator B <==[coupling]==> Resonator C
                ↑                            ↑                            ↑
           [presence]                  [presence]                   [presence]
                ↓                            ↓                            ↓
           [meaning] -----------------> [meaning] -----------------> [meaning]
                ↓                            ↓                            ↓
           [intent] ------------------> [commitment] --------------> [consequence]

§Quick Start

use maple_runtime::{MapleRuntime, config::RuntimeConfig, ResonatorSpec};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Bootstrap runtime
    let config = RuntimeConfig::default();
    let runtime = MapleRuntime::bootstrap(config).await?;

    // Register a Resonator
    let spec = ResonatorSpec::default();
    let resonator = runtime.register_resonator(spec).await?;

    // Resonator is now active and can participate in resonance

    // Shutdown gracefully
    runtime.shutdown().await?;
    Ok(())
}

§Platform-Specific Configurations

§Mapleverse (Pure AI Agents)

use maple_runtime::{MapleRuntime, config::mapleverse_runtime_config};

let config = mapleverse_runtime_config();
let runtime = MapleRuntime::bootstrap(config).await?;

§Finalverse (Human-AI Coexistence)

use maple_runtime::{MapleRuntime, config::finalverse_runtime_config};

let config = finalverse_runtime_config();
let runtime = MapleRuntime::bootstrap(config).await?;

§iBank (Autonomous Finance)

use maple_runtime::{MapleRuntime, config::ibank_runtime_config};

let config = ibank_runtime_config();
let runtime = MapleRuntime::bootstrap(config).await?;

§The 8 Canonical Invariants

These invariants are enforced at runtime and violations are treated as system errors:

  1. Presence precedes meaning: A Resonator must be present before it can form or receive meaning
  2. Meaning precedes intent: Intent cannot be formed without sufficient meaning
  3. Intent precedes commitment: Commitments cannot be created without stabilized intent
  4. Commitment precedes consequence: No consequence may occur without an explicit commitment
  5. Coupling is bounded by attention: Coupling strength cannot exceed available attention
  6. Safety overrides optimization: Safety constraints take precedence over performance
  7. Human agency cannot be bypassed: Human Resonators must always be able to disengage
  8. Failure must be explicit: All failures must be surfaced, never hidden

Re-exports§

pub use runtime_core::ContinuityProof;
pub use runtime_core::CouplingHandle;
pub use runtime_core::MapleRuntime;
pub use runtime_core::ResonatorHandle;
pub use runtime_core::ResonatorIdentitySpec;
pub use runtime_core::ResonatorSpec;
pub use runtime_core::ScheduleHandle;
pub use types::AttentionBudget;
pub use types::AttentionBudgetSpec;
pub use types::AttentionClass;
pub use types::Commitment;
pub use types::CommitmentContent;
pub use types::CommitmentStatus;
pub use types::Coupling;
pub use types::CouplingParams;
pub use types::CouplingPersistence;
pub use types::CouplingScope;
pub use types::LocalTimestamp;
pub use types::PresenceConfig;
pub use types::PresenceState;
pub use types::ResonatorId;
pub use types::ResonatorProfile;
pub use types::SymmetryType;
pub use types::TemporalAnchor;
pub use invariants::ArchitecturalInvariant;
pub use invariants::InvariantViolation;
pub use types::AttentionError;
pub use types::BootstrapError;
pub use types::CommitmentError;
pub use types::CouplingError;
pub use types::PresenceError;
pub use types::RegistrationError;
pub use types::ResumeError;
pub use types::SchedulingError;
pub use types::ShutdownError;
pub use types::TemporalError;

Modules§

allocator
Attention allocation and management
config
Configuration for MAPLE Resonance Runtime
fabrics
Resonance fabrics - Presence and Coupling infrastructure
invariants
Invariant enforcement - The 8 Canonical Invariants
runtime_core
MAPLE Resonance Runtime Core
scheduler
Resonance Scheduler - attention-aware task scheduling
telemetry
Telemetry and observability for MAPLE Resonance Runtime
temporal
Temporal coordination without global clocks
types
Core type definitions for MAPLE Resonance Runtime