summaryrefslogtreecommitdiff
path: root/src/sailfish_devel_mcp/config.py
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@jolla.com>2026-06-02 00:17:51 +0200
committerAndrew Branson <andrew.branson@jolla.com>2026-06-02 00:17:51 +0200
commit0cdf2d00cdc1a9af5f5b0b14241a2afe717661f6 (patch)
treea41154a24cb2c226847aef053d0121e34ff99ad6 /src/sailfish_devel_mcp/config.py
parent1f14c5483ee111105f94d66fb3b82208946d914a (diff)
Add Sailfish MCP build and device helpers
Add OBS root scoping, user-session/browser/touch workflow device tools, local SDK metadata refresh, and asynchronous RPM build job status support.
Diffstat (limited to 'src/sailfish_devel_mcp/config.py')
-rw-r--r--src/sailfish_devel_mcp/config.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sailfish_devel_mcp/config.py b/src/sailfish_devel_mcp/config.py
index 6515918..73740d1 100644
--- a/src/sailfish_devel_mcp/config.py
+++ b/src/sailfish_devel_mcp/config.py
@@ -39,6 +39,7 @@ class DeviceConfig:
@dataclass(frozen=True)
class PathConfig:
git_root: Path = Path.home() / "git"
+ obs_root: Path = Path.home() / "OBS"
ssh_config: Path = Path.home() / ".ssh" / "config"
build_sailfishos: Path = BUNDLED_BUILD_HELPER
local_sdk: Path | None = None
@@ -47,6 +48,7 @@ class PathConfig:
def public_dict(self) -> dict[str, str | None]:
return {
"git_root": str(self.git_root),
+ "obs_root": str(self.obs_root),
"ssh_config": str(self.ssh_config),
"build_sailfishos": str(self.build_sailfishos),
"local_sdk": str(self.local_sdk) if self.local_sdk else None,
@@ -155,6 +157,13 @@ def _load_paths(raw_paths: Any) -> PathConfig:
or defaults.git_root
)
).expanduser(),
+ obs_root=Path(
+ str(
+ raw_paths.get("obs_root")
+ or os.environ.get("SAILFISH_MCP_OBS_ROOT")
+ or defaults.obs_root
+ )
+ ).expanduser(),
ssh_config=Path(
str(
raw_paths.get("ssh_config")