47 lines
2.4 KiB
Python
47 lines
2.4 KiB
Python
"""MemPalace configuration — paths and fleet settings.
|
|
|
|
All configuration is driven by environment variables so that
|
|
different wizards on different VPSes can use the same code with
|
|
their own palace directories.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
from pathlib import Path
|
|
|
|
# ── Palace path ──────────────────────────────────────────────────────────────
|
|
# Default: ~/.mempalace/palace/ (local wizard palace)
|
|
# Override via MEMPALACE_PATH env var (useful for fleet shared wing)
|
|
_default = Path.home() / ".mempalace" / "palace"
|
|
MEMPALACE_PATH: Path = Path(os.environ.get("MEMPALACE_PATH", str(_default)))
|
|
|
|
# ── Fleet shared wing ─────────────────────────────────────────────────────────
|
|
# Path to the shared fleet palace on Alpha (used by --fleet searches)
|
|
_fleet_default = Path("/var/lib/mempalace/fleet")
|
|
FLEET_PALACE_PATH: Path = Path(
|
|
os.environ.get("FLEET_PALACE_PATH", str(_fleet_default))
|
|
)
|
|
|
|
# ── Wing name ─────────────────────────────────────────────────────────────────
|
|
# Identifies this wizard's wing within a shared palace.
|
|
# Populated from MEMPALACE_WING env var or falls back to system username.
|
|
def _default_wing() -> str:
|
|
import getpass
|
|
return os.environ.get("MEMPALACE_WING", getpass.getuser())
|
|
|
|
FLEET_WING: str = _default_wing()
|
|
|
|
# ── Fleet rooms standard ─────────────────────────────────────────────────────
|
|
# Canonical rooms every wizard must have (see docs/mempalace/rooms.yaml)
|
|
CORE_ROOMS: list[str] = [
|
|
"forge", # CI, builds, infra
|
|
"hermes", # agent platform, gateway, CLI
|
|
"nexus", # reports, docs, KT
|
|
"issues", # tickets, backlog
|
|
"experiments", # prototypes, spikes
|
|
]
|
|
|
|
# ── ChromaDB collection name ──────────────────────────────────────────────────
|
|
COLLECTION_NAME: str = os.environ.get("MEMPALACE_COLLECTION", "palace")
|