remove vestigial agent-ports.json tcp web-port map

This commit is contained in:
damocles 2026-06-22 11:59:05 +02:00
commit ad6b39b425
7 changed files with 33 additions and 209 deletions

View file

@ -1,7 +1,7 @@
//! Central host-side state paths under `/var/lib/hyperhive`.
//!
//! Historically these were flat string literals scattered across many
//! modules (`broker.sqlite`, `matrix-admin-token`, `agent-ports.json`,
//! modules (`broker.sqlite`, `matrix-admin-token`, `agent-sockets.json`,
//! …) directly under the state root. This module groups the **strictly
//! host-side** ones (read/written by hive-c0re alone, no nix-module or
//! container coupling) into subdirs: `db/`, `forge/`, `matrix/`, `run/`.
@ -111,12 +111,6 @@ pub fn run_dir() -> PathBuf {
state_root().join("run")
}
/// `run/agent-ports.json` — name→port map the gateway routing reads.
#[must_use]
pub fn agent_ports_file() -> PathBuf {
run_dir().join("agent-ports.json")
}
/// `run/agent-sockets.json` — name→socket-path map for UDS upstreams.
#[must_use]
pub fn agent_sockets_file() -> PathBuf {
@ -150,9 +144,6 @@ pub fn relocate_legacy_state() {
for (old_rel, new) in &moves {
move_if_legacy(&root.join(old_rel), new);
}
// agent-ports.json handled here too (kept out of the array only to
// keep the fixed-size literal tidy).
move_if_legacy(&root.join("agent-ports.json"), &agent_ports_file());
// `forge-email-aligned-<name>` markers: glob the flat root.
if let Ok(rd) = std::fs::read_dir(&root) {
for ent in rd.flatten() {