Same systemic bug as the macp fix in the previous commit. After M5
added `registerBrainCommand`, `registerForgeCommand`, `registerLogCommand`
to packages/brain, packages/forge, packages/log, the publish workflow
silently skipped republishing those packages because their versions
stayed at 0.0.2 (already on the registry). Result: @mosaicstack/mosaic
imports `registerBrainCommand` (etc.) from @mosaicstack/brain, but the
registry copy of brain@0.0.2 predates M5 and does not contain that
export, causing:
SyntaxError: Named export 'registerBrainCommand' not found.
The requested module '@mosaicstack/brain' is a CommonJS module...
Fix:
- @mosaicstack/brain 0.0.2 → 0.0.3
- @mosaicstack/forge 0.0.2 → 0.0.3
- @mosaicstack/log 0.0.2 → 0.0.3
- @mosaicstack/mosaic 0.0.22 → 0.0.23 (deps changed)
@mosaicstack/auth was NOT bumped — mosaic CLI defines `registerAuthCommand`
locally in packages/mosaic/src/commands/auth.ts rather than importing
from @mosaicstack/auth, so the stale auth@0.0.2 on the registry is not
in the critical path.
memory, queue, storage, macp were already bumped in their respective
M5 PRs and are not affected.
After merge:
- Delete old dist-tag entries for brain/forge/log@0.0.2 from Gitea npm
registry so fresh installs resolve to 0.0.3.
- No new git tag needed — 0.0.23 subsumes 0.0.22.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mosaic/mosaic is now the single package providing both:
- 'mosaic' binary (CLI: yolo, coord, prdy, tui, gateway, etc.)
- 'mosaic-wizard' binary (installation wizard)
Changes:
- Move packages/cli/src/* into packages/mosaic/src/
- Convert dynamic @mosaic/mosaic imports to static relative imports
- Add CLI deps (ink, react, socket.io-client, @mosaic/config) to mosaic
- Add jsx: react-jsx to mosaic's tsconfig
- Exclude packages/cli from workspace (pnpm-workspace.yaml)
- Update install.sh to install @mosaic/mosaic instead of @mosaic/cli
- Bump version to 0.0.17
This eliminates the circular dependency between @mosaic/cli and
@mosaic/mosaic that was blocking the build graph.
Two bugs causing 'EACCES: permission denied, copyfile' when source
and target are the same path (e.g. wizard with sourceDir == mosaicHome):
1. No same-path guard — syncDirectory tried to copy every file onto
itself; git pack files are read-only (0444) so copyFileSync fails.
2. excludeGit only matched top-level .git — nested .git dirs like
sources/agent-skills/.git were copied, hitting the same permission
issue.
Fixes:
- Early return when resolve(source) === resolve(target)
- Match .git dirs at any depth via dirName and relPath checks
- Skip files inside .git/ paths
Added file-ops.test.ts with 4 tests covering all cases.
Publish pipeline:
- Add publish-npm step to .woodpecker/publish.yml — publishes all
@mosaic/* packages to Gitea npm registry on main push/tag
- Requires gitea_npm_token Woodpecker secret (package:write scope)
- publish-npm runs after build, parallel with Docker image builds
- pnpm publish resolves workspace:* to concrete versions automatically
Package configuration:
- All 20 packages versioned at 0.0.1-alpha.1
- publishConfig added to all packages (Gitea registry, public access)
- files field added to all packages (ship only dist/)
- @mosaic/forge includes pipeline/ assets in published package
Meta package (@mosaic/mosaic):
- Now depends on @mosaic/forge, @mosaic/macp, @mosaic/prdy,
@mosaic/quality-rails, @mosaic/types
- npm install @mosaic/mosaic pulls in the standalone framework
Build fixes:
- Fix forge and macp tsconfig rootDir: '.' -> 'src' so dist/index.js
resolves correctly (was dist/src/index.js)
- Exclude __tests__ and vitest.config from build includes
- Clean stale build artifacts from old rootDir config
Required Woodpecker secret:
woodpecker secret add mosaic/mosaic-stack \
--name gitea_npm_token --value '<token>' \
--event push,manual,tag