feat: unified install.sh + auto-update checker (deprecates mosaic/bootstrap) #347

Merged
jason.woltje merged 4 commits from feat/install-update-checker into main 2026-04-02 05:41:08 +00:00
Owner

Summary

Single tools/install.sh that installs both the Mosaic framework (~/.config/mosaic/) and @mosaic/cli (npm). Adds auto-update checking on CLI startup. Fully deprecates the mosaic/bootstrap repo.

What it does

tools/install.sh — unified installer

bash <(curl -fsSL https://git.mosaicstack.dev/mosaic/mosaic-stack/raw/branch/main/tools/install.sh)
  • Downloads monorepo archive from Gitea, extracts packages/mosaic/framework/
  • Runs the framework installer (preserves SOUL.md/USER.md/TOOLS.md/memory by default)
  • Installs @mosaic/cli via npm (scoped @mosaic registry in ~/.npmrc)
  • Flags: --check, --framework, --cli, --ref <branch>
  • curl-pipe safe (main() wrapper, no stdin consumption)

Auto-update checker

  • packages/mosaic/src/runtime/update-checker.ts — checks Gitea npm registry, caches result 1h at ~/.cache/mosaic/update-check.json
  • CLI startup: non-blocking background check on every mosaic invocation
  • mosaic update command: explicit check + install (--check for CI)
  • scripts/agent/session-start.sh: warns agents when CLI is outdated
  • Proper semver comparison including pre-release precedence

Cleanup

  • Deleted remote-install.sh and remote-install.ps1 (redundant redirectors)
  • Updated all mosaic/bootstrap references → mosaic/mosaic-stack
  • Updated defaults/README.md for monorepo, Pi as first-class runtime

Files changed (14 files, +767 / -298)

File Change
tools/install.sh New — unified installer (framework + npm CLI)
packages/mosaic/src/runtime/update-checker.ts New — version check module
packages/mosaic/__tests__/update-checker.test.ts New — semver + notice tests
packages/cli/src/cli.ts Background update check at startup + mosaic update command
packages/mosaic/src/index.ts Export update checker API
scripts/agent/session-start.sh Update check warning for agent sessions
eslint.config.mjs Allow __tests__/ in mosaic package
framework/bin/mosaic Fix stale bootstrap URLs
framework/bin/mosaic.ps1 Fix stale bootstrap URLs
framework/bin/mosaic-release-upgrade Fix upgrade URL
framework/bin/mosaic-release-upgrade.ps1 Fix upgrade URL
framework/defaults/README.md Rewritten for monorepo
framework/remote-install.sh Deleted
framework/remote-install.ps1 Deleted

Testing

  • vitest — semver comparison + notice formatting tests pass
  • tsc --noEmit — both @mosaic/mosaic and @mosaic/cli compile clean
  • bash -n — all shell scripts pass syntax check
  • Archive extraction verified: framework resolves correctly from Gitea tarball
  • --check flag verified against live Gitea registry

Deprecates

mosaic/bootstrap — zero references remain in the codebase. Ready to archive.

## Summary Single `tools/install.sh` that installs both the Mosaic framework (`~/.config/mosaic/`) and `@mosaic/cli` (npm). Adds auto-update checking on CLI startup. Fully deprecates the `mosaic/bootstrap` repo. ## What it does ### `tools/install.sh` — unified installer ```bash bash <(curl -fsSL https://git.mosaicstack.dev/mosaic/mosaic-stack/raw/branch/main/tools/install.sh) ``` - Downloads monorepo archive from Gitea, extracts `packages/mosaic/framework/` - Runs the framework installer (preserves SOUL.md/USER.md/TOOLS.md/memory by default) - Installs `@mosaic/cli` via npm (scoped `@mosaic` registry in `~/.npmrc`) - Flags: `--check`, `--framework`, `--cli`, `--ref <branch>` - curl-pipe safe (`main()` wrapper, no stdin consumption) ### Auto-update checker - `packages/mosaic/src/runtime/update-checker.ts` — checks Gitea npm registry, caches result 1h at `~/.cache/mosaic/update-check.json` - CLI startup: non-blocking background check on every `mosaic` invocation - `mosaic update` command: explicit check + install (`--check` for CI) - `scripts/agent/session-start.sh`: warns agents when CLI is outdated - Proper semver comparison including pre-release precedence ### Cleanup - **Deleted** `remote-install.sh` and `remote-install.ps1` (redundant redirectors) - **Updated** all `mosaic/bootstrap` references → `mosaic/mosaic-stack` - **Updated** `defaults/README.md` for monorepo, Pi as first-class runtime ## Files changed (14 files, +767 / -298) | File | Change | |---|---| | `tools/install.sh` | New — unified installer (framework + npm CLI) | | `packages/mosaic/src/runtime/update-checker.ts` | New — version check module | | `packages/mosaic/__tests__/update-checker.test.ts` | New — semver + notice tests | | `packages/cli/src/cli.ts` | Background update check at startup + `mosaic update` command | | `packages/mosaic/src/index.ts` | Export update checker API | | `scripts/agent/session-start.sh` | Update check warning for agent sessions | | `eslint.config.mjs` | Allow `__tests__/` in mosaic package | | `framework/bin/mosaic` | Fix stale bootstrap URLs | | `framework/bin/mosaic.ps1` | Fix stale bootstrap URLs | | `framework/bin/mosaic-release-upgrade` | Fix upgrade URL | | `framework/bin/mosaic-release-upgrade.ps1` | Fix upgrade URL | | `framework/defaults/README.md` | Rewritten for monorepo | | `framework/remote-install.sh` | **Deleted** | | `framework/remote-install.ps1` | **Deleted** | ## Testing - `vitest` — semver comparison + notice formatting tests pass - `tsc --noEmit` — both `@mosaic/mosaic` and `@mosaic/cli` compile clean - `bash -n` — all shell scripts pass syntax check - Archive extraction verified: framework resolves correctly from Gitea tarball - `--check` flag verified against live Gitea registry ## Deprecates `mosaic/bootstrap` — zero references remain in the codebase. Ready to archive.
jason.woltje added 3 commits 2026-04-02 02:34:25 +00:00
- tools/install.sh: standalone installer/upgrader, curl-pipe safe
  (main() wrapper, process.argv instead of stdin, mkdir -p prefix)
- packages/mosaic/src/runtime/update-checker.ts: version check module
  with 1h cache at ~/.cache/mosaic/update-check.json
- CLI startup: non-blocking background update check on every invocation
- 'mosaic update' command: explicit check + install (--check for CI)
- session-start.sh: warns agents when CLI is outdated
- Proper semver comparison including pre-release precedence
- eslint: allow __tests__ in packages/mosaic for projectService
The @mosaic scope registry is configured in ~/.npmrc. Passing --registry
on the install command overrides the default registry for ALL packages,
causing non-@mosaic deps like @clack/prompts to 404 against Gitea.
feat: unify install.sh — single installer for framework + npm CLI
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/pr/ci Pipeline failed
de12221d47
- tools/install.sh now installs both components:
  1. Framework (bash launcher, guides, runtime configs) → ~/.config/mosaic/
  2. @mosaic/cli (TUI, gateway client, wizard) → ~/.npm-global/
- Downloads framework from monorepo archive (no bootstrap repo dependency)
- Supports --framework, --cli, --check, --ref flags
- Delete remote-install.sh and remote-install.ps1 (redundant redirectors)
- Update all stale mosaic/bootstrap references → mosaic/mosaic-stack
- Update README.md with monorepo install instructions

Deprecates: mosaic/bootstrap repo
jason.woltje added 1 commit 2026-04-02 02:51:42 +00:00
fix(mosaic): wizard integration test — templates path after monorepo migration
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
1ad0175ec1
Templates moved from packages/mosaic/templates/ to
packages/mosaic/framework/templates/ in #345. The test's
existsSync guard silently skipped the copy, causing writeSoul
to early-return without writing SOUL.md.
jason.woltje force-pushed feat/install-update-checker from 1ad0175ec1 to 3b9104429b 2026-04-02 05:12:26 +00:00 Compare
jason.woltje merged commit ea371d760d into main 2026-04-02 05:41:08 +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#347