Skip to main content

Crate atmd

Crate atmd 

Source
Expand description

ATM Daemon - Session registry and broadcast server

This crate provides the core infrastructure for the ATM daemon:

  • registry - Session registry actor for tracking Claude Code sessions
  • server - Unix socket server for client connections
  • monitor - Process monitoring for CPU/memory tracking

§Architecture

┌─────────────────────────────────────────────────────────────┐
│                    atmd daemon                         │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  ┌─────────────────┐     ┌─────────────────────────────┐   │
│  │  DaemonServer   │────▶│     RegistryActor           │   │
│  │ (Unix Socket)   │     │  (session state owner)      │   │
│  └────────┬────────┘     └──────────────┬──────────────┘   │
│           │                             │                   │
│           │ connections                 │ events            │
│           ▼                             ▼                   │
│  ┌─────────────────┐     ┌─────────────────────────────┐   │
│  │ConnectionHandler│     │   broadcast::Sender         │   │
│  │  (per client)   │     │   (event distribution)      │   │
│  └─────────────────┘     └─────────────────────────────┘   │
│                                                             │
└─────────────────────────────────────────────────────────────┘

§Panic-Free Guarantees

All production code in this crate follows the panic-free policy from CLAUDE.md:

  • No .unwrap(), .expect(), panic!(), unreachable!(), todo!()
  • All fallible operations return Result or Option
  • Channel operations handle closure gracefully

Modules§

discovery
Session discovery - finds existing coding-agent sessions.
monitor
Process monitoring for the ATM daemon.
registry
Session registry using Actor pattern.
server
Unix socket server for the ATM daemon.
tmux
Tmux integration for session discovery.