refactor(#2285): repoint knowledge + forge core-token to paths.rs consts

This commit is contained in:
damocles 2026-07-10 19:35:59 +02:00 committed by mara
commit 4162f557c9
3 changed files with 15 additions and 15 deletions

View file

@ -209,12 +209,11 @@ pub fn shared_root() -> PathBuf {
state_root().join("shared")
}
/// `knowledge/` — local checkout of the `internal/knowledge` repo.
/// `knowledge/` — local checkout of the `internal/knowledge` repo. A
/// `&str` (used as a git `-C` arg / clone target throughout the knowledge
/// worker), so it stays a const rather than a `PathBuf` fn.
// nix: bind-mounted read-only into agent containers as `/knowledge` (harness-base.nix) — must match.
#[must_use]
pub fn knowledge_dir() -> PathBuf {
state_root().join("knowledge")
}
pub const KNOWLEDGE_DIR: &str = "/var/lib/hyperhive/knowledge";
/// `gateway/` — generated nginx include fragments for the gateway vhost.
// nix: bind-mounted into the gateway container (hive-gateway.nix) — must match.
@ -229,12 +228,11 @@ pub fn gateway_agents_conf() -> PathBuf {
gateway_dir().join("agents.conf")
}
/// `forge-core-token` — the hive-c0re forge account API token.
/// `forge-core-token` — the hive-c0re forge account API token. A `&str`
/// (used in `Path::new` + user-facing `format!` messages), so it stays a
/// const rather than a `PathBuf` fn.
// nix: bind-mounted into the forge container / read at provisioning (hive-forge.nix) — must match.
#[must_use]
pub fn forge_core_token() -> PathBuf {
state_root().join("forge-core-token")
}
pub const FORGE_CORE_TOKEN: &str = "/var/lib/hyperhive/forge-core-token";
/// `matrix-register-token` — shared matrix registration token.
// nix: bind-mounted into the tuwunel/matrix container (hive-matrix.nix) — must match.