BREAKING CHANGE: ~/.config/mosaic/bin/ is removed entirely. The mosaic npm CLI is now the only executable. ## What changed - **bin/ → deleted**: All scripts moved to tools/_scripts/ (internal) - **mosaic-launch → deleted**: Launcher logic is native TypeScript in packages/cli/src/commands/launch.ts - **mosaic.ps1 → deleted**: PowerShell launcher removed - **Framework install.sh**: Complete rewrite with migration system - **Version tracking**: .framework-version file (schema v2) - **Migration v1→v2**: Auto-removes bin/, cleans old PATH entries from shell profiles ## Native TypeScript launcher (commands/launch.ts) All runtime launch logic ported from bash: - Runtime prompt builder (AGENTS.md + RUNTIME.md + USER.md + TOOLS.md) - Mission context injection (reads .mosaic/orchestrator/mission.json) - PRD status injection (scans docs/PRD.md) - Pre-flight checks (MOSAIC_HOME, AGENTS.md, SOUL.md, runtime binary) - Session lock management with signal cleanup - Per-runtime launch: Claude, Codex, OpenCode, Pi - Yolo mode flags per runtime - Pi skill discovery + extension loading - Framework management (init, doctor, sync, bootstrap) delegates to tools/_scripts/ bash implementations ## Installer - tools/install.sh: detects framework by .framework-version or AGENTS.md - Framework install.sh: migration system with schema versioning - Forward-compatible: add migrations as numbered blocks - No PATH manipulation for framework (npm bin is the only PATH entry)
26 lines
812 B
Bash
Executable File
26 lines
812 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# mosaic-wizard — Thin shell wrapper for the bundled TypeScript wizard
|
|
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
|
|
|
|
# Look for the bundle in the installed location first, then the source repo
|
|
WIZARD_BIN="$MOSAIC_HOME/dist/mosaic-wizard.mjs"
|
|
if [[ ! -f "$WIZARD_BIN" ]]; then
|
|
WIZARD_BIN="$(cd "$(dirname "$0")/.." && pwd)/dist/mosaic-wizard.mjs"
|
|
fi
|
|
|
|
if [[ ! -f "$WIZARD_BIN" ]]; then
|
|
echo "[mosaic-wizard] ERROR: Wizard bundle not found." >&2
|
|
echo "[mosaic-wizard] Re-install with: npm install -g @mosaic/mosaic" >&2
|
|
exit 1
|
|
fi
|
|
|
|
if ! command -v node >/dev/null 2>&1; then
|
|
echo "[mosaic-wizard] ERROR: Node.js is required but not found." >&2
|
|
echo "[mosaic-wizard] Install Node.js 18+ from https://nodejs.org" >&2
|
|
exit 1
|
|
fi
|
|
|
|
exec node "$WIZARD_BIN" "$@"
|