singularity-forge/packages
Jeremy McSpadden 71c3b12e70 fix: cmux library directory incorrectly loaded as extension (#1537)
* fix(#1526): auto-mode worktree commits land on main instead of milestone branch

GitServiceImpl.getMainBranch() was designed to detect manual /worktree worktrees
(worktree/<name> branches) but incorrectly applied the same logic to auto-mode
worktrees (milestone/<MID> branches). When no worktree/<name> branch existed,
it fell back to the current branch, which in certain contexts could be main,
causing slice commits to land on main instead of the milestone branch.

Fix: Detect if currently on a milestone/* branch first (auto-mode case) and
return it, before checking for worktree/* branches (manual worktree case).

- Modify getMainBranch() to detect milestone branches first
- Add test verifying getMainBranch() returns correct branch in auto-worktree
- All tests pass, build succeeds

Fixes #1526

* fix: cmux library directory incorrectly loaded as extension

The extension auto-discovery in resolveExtensionEntries() finds
index.js files in subdirectories and treats them as extensions.
The cmux directory has an index.js but it's a utility library
(imported by gsd and subagent extensions), not an extension itself.

Two changes:
1. When a package.json has a "pi" manifest, treat it as authoritative
   and don't fall through to index.ts/index.js auto-detection. This
   lets library directories opt out with "pi": {}.
2. Add package.json to cmux directory with empty pi manifest.
2026-03-19 21:14:25 -06:00
..
native refactor: remove dead code (unused exports) (#1486) 2026-03-19 15:33:32 -06:00
pi-agent-core fix: preserve user messages during abort with origin-aware queue clearing (#1439) (#1521) 2026-03-19 18:05:04 -06:00
pi-ai Merge pull request #1365 from jbrahy/fix/openai-reasoning-encrypted-content-always-include 2026-03-19 16:38:24 -06:00
pi-coding-agent fix: cmux library directory incorrectly loaded as extension (#1537) 2026-03-19 21:14:25 -06:00
pi-tui feat: integrate cmux with gsd runtime (#1532) 2026-03-19 20:05:06 -06:00