iron_runtime_state
Agent execution state management and audit logging.
Installation
[]
= { = "../iron_runtime_state" }
Quick Start
use StateManager;
use Arc;
// Create shared state manager
let state = new;
// Update agent state (thread-safe)
state.update_agent?;
// Retrieve current state
let agent = state.get_agent?;
// Log audit event
state.log_event?;
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)
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