Skip to content
Python

packaging: ship builtin persona bundles in the sidecar

Rohit C Prasad5f3ffe385dbe
diff --git a/packaging/openworker-server.spec b/packaging/openworker-server.spec
index fb113ad3..0f77857d 100644
--- a/packaging/openworker-server.spec
+++ b/packaging/openworker-server.spec
@@ -23,7 +23,7 @@ hides the window while keeping stdio intact.
import os
import sys
-from PyInstaller.utils.hooks import collect_all, collect_submodules
+from PyInstaller.utils.hooks import collect_all, collect_data_files, collect_submodules
# SPECPATH is injected by PyInstaller and points at this file's directory
# (<repo>/packaging). Derive everything else from it — no hardcoded paths.
@@ -44,6 +44,14 @@ binaries = []
for pkg in ("coworker", "aisuite", "mcp", "ddgs", "croniter", "docstring_parser"):
hiddenimports += collect_submodules(pkg)
+# Builtin personas ship as DATA, not code: personas/builtin/<id>/manifest.md plus their
+# skills/<name>/SKILL.md. collect_submodules only takes .py files, so without this the
+# packaged sidecar starts with NO builtin coworkers — the picker comes up empty and every
+# persona-scoped skill silently disappears. (pyproject's package-data covers pip installs;
+# PyInstaller needs its own instruction.) Keep this even if the persona set changes — it
+# collects whatever non-.py files the package carries.
+datas += collect_data_files("coworker")
+
if not INCLUDE_EXPERIMENTAL:
hiddenimports = [
m for m in hiddenimports if not m.startswith("coworker.connectors.experimental")