How its-jani/traffic-status works
traffic-status is a Windows floating status widget for AI coding-agent sessions. Agents or users send lifecycle and state updates through the CLI or localhost REST API; the daemon routes commands into session state, which the widget renders. Installation and diagnostics are a separate supported workflow. The excerpts show the daemon, IPC routing, session store, UI, and installer/CLI boundaries; integration hook behavior is documented in the README, but its implementation is not fully shown.
Main entry points: cli.rs CLI Commands · mod.rs IPC Server · main.rs Daemon Entry · session.rs Session Store
Components 15
Agent Interfaces
- Claude Command
.claude/commands/traffic.md - OpenCode Command
.opencode/commands/traffic.md - OpenCode Plugin
.opencode/plugins/traffic-status.js - CLI Commands
src/cli.rs
Daemon Runtime
- Daemon Entry
src/main.rs - IPC Server
src/ipc/mod.rs - HTTP Router
src/ipc/http.rs - State and Commands
src/types.rs
Session Widget
- Session Store
src/app/session.rs - Floating Widget
src/app/mod.rs
Setup and Diagnostics
- Hook Installer
src/installer.rs - Diagnostics
src/installer.rs
Other components
- User
- Coding Agent
- REST Client
Connections 22
- User → CLI Commands: runs commands
README.md - Coding Agent → Claude Command: invokes command
README.md - Coding Agent → OpenCode Command: invokes command
README.md - Coding Agent → OpenCode Plugin: emits lifecycle events
README.md - Claude Command → CLI Commands: calls CLI
README.md - OpenCode Command → CLI Commands: calls CLI
README.md - OpenCode Plugin → IPC Server: updates status
- REST Client → IPC Server: sends requests
README.md - User → Hook Installer: installs hooks
README.md - User → Diagnostics: requests diagnosis
README.md - CLI Commands → Hook Installer: runs setup
src/cli.rs - CLI Commands → Diagnostics: runs diagnostics
src/cli.rs - CLI Commands → Daemon Entry: launches daemon
README.md - CLI Commands → IPC Server: sends control request
src/cli.rs - Daemon Entry → CLI Commands: checks daemon
src/main.rs - Daemon Entry → IPC Server: starts server
src/main.rs - Daemon Entry → Floating Widget: creates widget
src/main.rs - IPC Server → HTTP Router: routes HTTP
src/ipc/mod.rs - HTTP Router → State and Commands: builds commands
src/ipc/http.rs - IPC Server → Session Store: dispatches commands
- Floating Widget → Session Store: uses session state
src/app/mod.rs - Session Store → State and Commands: applies commands
src/app/session.rs