Session Lifecycle
TUI Phases
The terminal UI moves through defined phases managed by PhaseManager:
shell → loading → menu → main → [hitl] → [multi] → end
| Phase | Description |
|---|---|
shell | Binary startup, terminal initialization |
loading | Bootstrap sequence, config loading |
menu | Session menu display |
main | Normal operation - agents, channels, input active |
hitl | Human-in-the-loop (approval modal active) |
multi | Multi-agent coordination mode |
end | Shutdown/cleanup |
Boot Sequence
What happens on armament launch:
- Terminal initialization (raw mode, screen buffer)
- Load config (
~/.armament/config.yaml) - Initialize event bus and core services
- Load saved session state (if resuming)
- Present session menu or enter
mainphase - Spawn default channel (
#armament)
Key Capabilities
Session Persistence
Session state (channels, agents, messages, config) is persisted to disk at ~/.armament/sessions/ and can be resumed on restart.
Hot Configuration
Configuration can be changed live via /config menu or /set commands without restarting:
/set theme ice
/config
Planned Enhancements
- Session pause/resume with agent suspension
- Crash recovery from checkpoints
- Reconfiguration atomic swap with rollback
- Budget enforcement with pause/warn/hard-stop actions
- Graceful shutdown with final checkpoint