Daeseon Yoo
Back to project
·Update·1 min

A macOS clipboard agent, and splitting the agent cross-platform

Added a macOS clipboard agent and refactored the single 397-line main into clean per-platform files (Windows/macOS) with a shared core and a launchd service.

Reconstructed from commit be4aba5 (2026-03-31).

The clipboard agent started life as one big Windows-only main.go (~397 lines). To support macOS too, it needed to be split along the OS boundary — shared logic in the middle, platform-specific bits behind build tags.

The refactor

Why it matters

The architecture lesson that paid off repeatedly: keep the OS-specific surface tiny and behind an interface, so the agent's real logic (enrollment, queueing, delivery) is written and tested once. Adding a third platform later is just one more file, not a rewrite. (Months on, this same structure is what let the Windows install move from a service to a Scheduled Task without touching the core.)