Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CARRIER//OP0

Always-on Telehack relay chat client — dark phreaker, mainframe meets aerospace. A Rust daemon keeps op0 parked in relay 24/7 (ssh subprocess, auto-reconnect, local scrollback archive), and a phosphor-green ratatui client attaches over a unix socket for a Moore-font sign-on ceremony.

Green P1 phosphor #39ff14 on #010d01 — the same palette as the kitty-retro-pack radar/bunker family. Designed to be run inside that pack's Moore Computer profile.

#####   ###   ####   ####   #####  #####  ####
#      #   #  #   #  #   #    #    #      #   #
#####  #####  ####   ####     #    ###    ####
#      #   #  # #    # #      #    #      # #
#####  #   #  #  ##  #  ##  #####  #####  #  ##

Usage

carrier              # attach (auto-starts the daemon if needed)
carrier daemon       # run the always-on session loop (detached via attach)
carrier stop         # stop the daemon (reads ~/.carrier/carrier.pid)

One command UX: carrier probes the daemon socket, spawns the daemon if it's missing or stale, and attaches the TUI. The daemon survives TUI exits — relay presence, mention alerts, and the archive keep running.

Keys

Key Action
Enter send line (messages and /commands both go to relay)
Ctrl+C / Ctrl+D quit
Ctrl+R refresh roster (/who) — or reconnect when offline (standby)
Ctrl+W refresh rooms (/list)
Ctrl+L pull the last 200 archived lines into view
Ctrl+U clear the input line
PgUp / PgDn scroll chat
Esc clear input
/clear locally clear the chat pane

Layout

+-------------------------------+------------+
| CARRIER//OP0 header           | ROOMS      |
| chat stream                   | ROSTER     |
| (timestamps, mentions         |            |
|  reversed-video, own sends    |            |
|  marked >)                    |            |
| TRANSMIT input                |            |
| status: state users rooms clk |            |
+-------------------------------+------------+
  • Ceremony: full ASCII banner + DIALING/LINKED while not connected; collapses to a one-line header once the relay prompt appears.
  • Mentions of op0 render reversed-video AND fire a macOS notification (daemon-side, so alerts work with the TUI closed).
  • The relay has no timestamps and no colors — the client adds local HH:MM and phosphor styling locally; the daemon archives everything timestamped to ~/.carrier/relay-history.log.

Architecture

  • daemon (src/daemon.rs) — owns ssh -tt telehack, splits the stream on \r/\n, strips ANSI (the relay emits screen-clear and reset codes despite being uncolored), parses messages/emotes/ join-part/system/who rows, handles the relay's unterminated > prompt (flushed from the line buffer), reconnects with exponential backoff, keeps a silent \0 (NUL) keepalive — per Devon (telehack dev, 2026-08-11), and speaks JSON-lines IPC on ~/.carrier/carrier.sock (tokio broadcast for events, mpsc for commands, watch channel so late-attaching clients get the current connection state — Ready is a one-shot broadcast otherwise).
  • TUI (src/tui/) — ratatui + crossterm event-stream. A reader task forwards socket events; the UI loop tokio::select!s keys, events, and a 250ms clock tick. Own sends render locally; the daemon filters the remote echo.
  • parser (src/parse.rs) — pure functions over the wire format, unit-tested against a captured real relay stream (fixture) plus ANSI-stripping regression tests.

Tests

cargo test        # parser unit tests + fake-ssh end-to-end daemon test

The integration test spawns the real binary against a fake ssh (injected via PATH) that plays a captured relay fixture — no network needed. Build: Rust 2024, tokio, ratatui 0.29, crossterm 0.28.

Files

  • ~/.carrier/carrier.sock — IPC socket
  • ~/.carrier/relay-history.log — timestamped archive (grows forever)
  • ~/.carrier/daemon.log — daemon stderr/tracing
  • ~/.carrier/carrier.pid — pidfile for carrier stop

License

MIT © 2026 Jaramie Morris. EST.1986 // AWOKEN 2026 // HELSINKI.

About

CARRIER//OP0 — always-on Telehack relay chat client. Rust daemon + phosphor-green ratatui TUI. EST.1986 // AWOKEN 2026

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages