iron_runtime_state

Crates.ioiron_runtime_state
lib.rsiron_runtime_state
version0.3.0
created_at2025-12-16 16:01:18.181596+00
updated_at2025-12-16 16:01:18.181596+00
descriptionRuntime state management for Iron Cage agents
homepage
repositoryhttps://github.com/.../iron_runtime
max_upload_size
id1988180
size78,927
Wandalen (Wandalen)

documentation

README

iron_runtime_state

Agent execution state management and audit logging.

Documentation

Installation

[dependencies]
iron_runtime_state = { path = "../iron_runtime_state" }

Quick Start

use iron_runtime_state::StateManager;
use std::sync::Arc;

// Create shared state manager
let state = Arc::new(StateManager::new("./state.db")?);

// Update agent state (thread-safe)
state.update_agent("agent_001", AgentState::Running)?;

// Retrieve current state
let agent = state.get_agent("agent_001")?;

// Log audit event
state.log_event("agent_001", "PII detected and redacted")?;
Scope & Boundaries

Responsibilities: Manages agent execution state with fast in-memory access (DashMap) for real-time dashboard updates and persistent SQLite storage for compliance audit trails. Provides thread-safe concurrent access for multiple crates reading and writing state simultaneously.

In Scope:

  • In-memory state storage (DashMap for concurrent access)
  • Agent state CRUD operations (create, read, update, list)
  • Audit event logging to SQLite
  • SQLite persistence (single-file database)
  • Thread-safe state access (Arc-based sharing)
  • State change broadcasting for dashboard updates
  • Agent lifecycle state tracking (Starting, Running, Stopped, Failed)

Out of Scope:

  • Redis distributed state (future)
  • State replication and consensus (future)
  • Historical state queries and time-series (future)
  • State migrations and schema versioning (future)
  • State backup and recovery automation (future)
  • REST API endpoints (see iron_control_api)
  • Dashboard UI (see iron_dashboard)
  • WebSocket broadcasting (see iron_control_api)
Directory Structure

Source Files

File Responsibility
lib.rs Type-safe state management for Iron Cage runtime

Notes:

  • Entries marked 'TBD' require manual documentation
  • Entries marked '⚠️ ANTI-PATTERN' should be renamed to specific responsibilities

License

Apache-2.0

Commit count: 0

cargo fmt