Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(build): ship the conductor package with its data files

rubenluetke10-beepebde0b23c497
diff --git a/jarvis.spec b/jarvis.spec
index 29adeb4dab..ae88f333eb 100644
--- a/jarvis.spec
+++ b/jarvis.spec
@@ -140,6 +140,12 @@ for entry in _package_root.rglob("*"):
rel = entry.relative_to(PROJECT_ROOT).parent
datas.append((str(entry), str(rel)))
+# The Conductor jobs engine reads its SQL schema and seed jobs beside its own
+# modules; analysis finds the modules, not these files.
+for entry in (PROJECT_ROOT / "conductor").rglob("*"):
+ if entry.is_file() and entry.suffix.lower() in {".sql", ".yaml"}:
+ datas.append((str(entry), str(entry.relative_to(PROJECT_ROOT).parent)))
+
# Configuration profiles live beside the checkout root, and jarvis.core.config
# resolves them relative to it.
profiles_dir = PROJECT_ROOT / "profiles"
diff --git a/pyproject.toml b/pyproject.toml
index f44aeba2bd..3e28548798 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -823,7 +823,11 @@ call-contact = "jarvis.plugins.tool.call_contact:CallContactTool"
[tool.setuptools.packages.find]
where = ["."]
-include = ["jarvis*"]
+# ``conductor`` is the scheduled-jobs engine behind /api/conductor/* and the
+# ``jarvis conductor`` commands. Left out, it imported only when the app ran
+# with the checkout as its working directory (run.bat), so the console script,
+# autostart and every wheel install served no Conductor API at all.
+include = ["jarvis*", "conductor*"]
exclude = ["*.__pycache__", "*.__pycache__.*"]
[tool.setuptools.exclude-package-data]
@@ -831,6 +835,8 @@ exclude = ["*.__pycache__", "*.__pycache__.*"]
"*" = ["*.pyc", "*.pyo", "**/__pycache__/*"]
[tool.setuptools.package-data]
+# Read via Path(__file__) by conductor.core.store / conductor.core.seed.
+conductor = ["core/schema.sql", "seed/*.yaml"]
jarvis = [
"ui/web/dist/**/*",
"ui/web/dist/*",
diff --git a/tests/unit/conductor/test_packaging.py b/tests/unit/conductor/test_packaging.py
new file mode 100644
index 0000000000..5c1da20bec
--- /dev/null
+++ b/tests/unit/conductor/test_packaging.py
@@ -0,0 +1,48 @@
+"""Conductor ships in the distribution, data files included.
+
+``conductor`` was missing from ``packages.find``: it imported only when the
+app's working directory was the checkout (run.bat), so the console script,
+autostart and every wheel install served no ``/api/conductor/*`` at all and
+``jarvis conductor ...`` answered 404.
+"""
+
+from __future__ import annotations
+
+import fnmatch
+import tomllib
+from pathlib import Path
+
+from setuptools import find_packages
+
+ROOT = Path(__file__).resolve().parents[3]
+
+
+def _setuptools_cfg() -> dict:
+ with (ROOT / "pyproject.toml").open("rb") as fh:
+ return tomllib.load(fh)["tool"]["setuptools"]
+
+
+def test_conductor_packages_are_distributed() -> None:
+ find = _setuptools_cfg()["packages"]["find"]
+ packages = set(
+ find_packages(
+ where=str(ROOT / find.get("where", ["."])[0]),
+ include=find["include"],
+ exclude=find.get("exclude", []),
+ )
+ )
+ assert {"conductor", "conductor.api", "conductor.core", "conductor.jobs"} <= packages
+
+
+def test_conductor_runtime_data_files_are_declared() -> None:
+ patterns = _setuptools_cfg()["package-data"]["conductor"]
+ data_files = [
+ path.relative_to(ROOT / "conductor").as_posix()
+ for path in (ROOT / "conductor").rglob("*")
+ if path.is_file() and path.suffix in {".sql", ".yaml"}
+ ]
+ assert data_files
+ undeclared = [
+ name for name in data_files if not any(fnmatch.fnmatch(name, p) for p in patterns)
+ ]
+ assert undeclared == []