packaging: ship builtin persona bundles in the sidecar

collect_submodules only takes .py, so packaged builds had no builtin coworkers.
Caught by inspecting the DMG — dev installs read them from the source tree.
This commit is contained in:
Rohit C Prasad
2026-08-13 15:46:13 -07:00
committed by Rohit P
parent 06a4365132
commit 5f3ffe385d
+9 -1
View File
@@ -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")