Plan: retire the Swift servers on main
Written 2026-11-03. Background: ADR 0005, CUTOVER.md, mcp.md.
Where it stands #
The Go tower (tower/) runs luigi's station and every device works against it.
The Swift tower, the control room and the Mac "AntennaTower" helper still sit
in the tree, and the Manager still links their libraries and hosts its own MCP
assistant. The decision (ADR 0005) is no Swift/Go hybrid, so they go.
What goes, what stays #
| Goes | Why |
|---|---|
Packages/Station targets StationServer, StationJobs, executables antenna-tower-server, control-room |
The Go tower does all of it |
Packages/RetroRelay target RelayServer (Hummingbird) |
Go internal/relay |
Packages/antenna-tower.Dockerfile, control-room.Dockerfile, deploy/docker-compose.yml |
tower/Dockerfile replaces them |
project.yml AntennaTower Mac app target and Sources/AntennaTower |
The Mac runs the Go binary under launchd (tower/deploy) |
Manager hosting: RelayHost, RemoteServer, in-process jobs, AssistantServer and friends |
The Manager is a client only |
Stays: RelayAdmin, RelayKit, StationCore (including Remote), RetroLineup,
RetroSports, all client code. They are the clients' side of the written interface.
Status #
- 1a, 1b: done (
8105926). - 1c, 1d: done (see the commit after it).
search_channels,add_channel,add_feed,add_stream_url,find_feeds,sync_catalogs,reload_lineup,test_stream,audit,add_sport_channeland the five health tools are in Go. Gaps: Plex Live TV isn't searched or tested; Tubi isn't tested; streams are checked over HTTP, not played. - Channel modules' tools: done.
get_/set_for MBTA, World and Video Store,find_mbta_stations,list_mbta_lines,add_world_area. The MBTA and World settings are each profile's, so the tools take aprofile;add_world_areageocodes with Nominatim, not Apple's search.
Order #
Each step leaves main building and the Manager working.
- Port the assistant to the Go MCP server (this document's first half of work).
Until the lineup tools exist in Go, deleting
AssistantServerwould lose them.- 1a.
tower/internal/lineup: the dial as a pure function of the synced settings (channelNumbers,channelNames,hiddenChannels,offDialChannels,savedChannels,iptvLineup,channelGroups) plus the built-in channels. Reusesinternal/iptv,internal/ledgerand theDialNumbersrules (merge, settle, numbering, moving, releasing). - 1b. Settings-only tools:
list_channels,get_channel,remove_channel,restore_channel,renumber_channel,rename_channel,release_number,list_groups,add_group,set_group,set_on_dial,set_feeds,set_entries,set_preferred_login,merge_channels,set_buffer. - 1c. Tools needing catalogs and the network:
search_channels,add_channel,add_feed,add_stream_url,find_feeds,sync_catalogs,reload_lineup,test_stream(an HLS fetch: manifest, first segment, ffprobe-free),audit. - 1d. Health:
get_errors,whats_playing,get_storage,clear_cache,get_diagnostics(Bonjour browse for Apple TVs, fetch the log).
- 1a.
- Manager talks to the tower. The 38 Manager files that import the server
libraries move to
RelayAdmincalls: hosting and handover go (the tower is the host); jobs run in the tower already (/v1/adminevents, sports). Where a Manager view called a library directly, it calls the admin API. - Delete the Swift server code, the Dockerfiles and compose file, the
AntennaTowertarget, and fixproject.yml,justfile, docs. - Verify:
xcodegen, Manager and TV builds,swift testin the remaining packages,go test -race ./...and the Swift-client conformance suite.
Verification of the port #
- Tool descriptions and argument names are copied from the Swift tools, so
clients keep working;
docs/mcp.mdlists them. - Dial rules are tested against the real Swift
DialNumberscompiled into testdata (the same method as the rest oftower/conformance). - Tools are exercised through
mcp.Server.ServeStdio, likeinternal/tools.
Decisions #
- A tool that needs a playing screen (
test_streamused AVPlayer) becomes a network check in the tower: manifest reachable, a segment fetched. It says so. - Plex/Pluto channels appear on the dial from the tower's cached catalogs; the
numbers are kept in the synced
channelNumbersas before, so a screen and the tower agree. - The Manager keeps working against either tower until step 3.
Phin Tech docs
Rabbit Ears Manager in the store →