fix(macp): align exports + add CLI smoke test #415

Merged
jason.woltje merged 1 commits from feat/mosaic-cli-smoke-test into main 2026-04-05 06:57:42 +00:00
Owner

Mission: cli-unification-20260404. Tasks: CU-05-09, CU-05-10.

Summary

1. Fix macp exports map — packages/macp/package.json had a pre-existing exports default pointing at src/index.ts while every other workspace package points at dist/index.js. This broke any consumer loading the compiled mosaic CLI via node (mosaic --help, mosaic forge --help). Discovered while running the CU-05-10 smoke test on a freshly-built dist/cli.js.

2. CU-05-10 CLI smoke test — packages/mosaic/src/cli-smoke.spec.ts asserts every register function from the eight sub-packages plus config attaches a top-level command to the root program and that its help output renders without throwing. 19 tests across 9 commands.

CU-05-09 verification

The wiring task is de facto complete. packages/mosaic/src/cli.ts already imports and calls all nine register functions. Each M5 sub-package PR landed its own wire.

Verification

  • pnpm filter mosaic typecheck lint build test — all green, 144 tests
  • pnpm format:check — clean
  • mosaic --help — exits 0, prints all 9 new commands
  • All 9 sub-command --help exits 0

Closes CU-05-09 and CU-05-10.

Mission: cli-unification-20260404. Tasks: CU-05-09, CU-05-10. ## Summary **1. Fix macp exports map** — packages/macp/package.json had a pre-existing exports default pointing at src/index.ts while every other workspace package points at dist/index.js. This broke any consumer loading the compiled mosaic CLI via node (mosaic --help, mosaic forge --help). Discovered while running the CU-05-10 smoke test on a freshly-built dist/cli.js. **2. CU-05-10 CLI smoke test** — packages/mosaic/src/cli-smoke.spec.ts asserts every register function from the eight sub-packages plus config attaches a top-level command to the root program and that its help output renders without throwing. 19 tests across 9 commands. ## CU-05-09 verification The wiring task is de facto complete. packages/mosaic/src/cli.ts already imports and calls all nine register functions. Each M5 sub-package PR landed its own wire. ## Verification - pnpm filter mosaic typecheck lint build test — all green, 144 tests - pnpm format:check — clean - mosaic --help — exits 0, prints all 9 new commands - All 9 sub-command --help exits 0 Closes CU-05-09 and CU-05-10.
jason.woltje added 1 commit 2026-04-05 06:49:56 +00:00
fix(macp): point exports.default at dist/index.js + add CLI smoke test (CU-05-09, CU-05-10)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
510d5d5b93
macp package.json had a pre-existing exports map with default: './src/index.ts'
which broke any consumer that loaded the compiled mosaic CLI via node (mosaic
--help, mosaic <cmd> --help). Every other workspace package points at
./dist/index.js — align macp with the rest.

Adds packages/mosaic/src/cli-smoke.spec.ts — the CU-05-10 integration smoke
test that asserts every register<Name>Command from the eight sub-packages
(auth, brain, forge, log, macp, memory, queue, storage) plus config attaches a
top-level command and that its help output renders without throwing. Running
this locally after the macp fix confirms mosaic --help and mosaic <cmd> --help
exit 0 for all nine commands.

Part of mission cli-unification-20260404.
jason.woltje merged commit 831193cdd8 into main 2026-04-05 06:57:42 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#415