fix: rename all packages from @mosaic/* to @mosaicstack/*
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
ci/woodpecker/push/ci Pipeline failed

- Updated all package.json name fields and dependency references
- Updated all TypeScript/JavaScript imports
- Updated .woodpecker/publish.yml filters and registry paths
- Updated tools/install.sh scope default
- Updated .npmrc registry paths (worktree + host)
- Enhanced update-checker.ts with checkForAllUpdates() multi-package support
- Updated CLI update command to show table of all packages
- Added KNOWN_PACKAGES, formatAllPackagesTable, getInstallAllCommand
- Marked checkForUpdate() with @deprecated JSDoc

Closes #391
This commit is contained in:
Jarvis
2026-04-04 21:43:23 -05:00
parent 80994bdc8e
commit 774b76447d
200 changed files with 828 additions and 641 deletions

View File

@@ -1,16 +1,16 @@
# Scratchpad — issue #387 updater simplification + Gitea wrapper repo context
- Objective: simplify updater behavior to `@mosaic/mosaic` only, and fix Gitea wrapper scripts so merge/CI/issue operations work reliably when tea needs explicit repo/login context.
- Objective: simplify updater behavior to `@mosaicstack/mosaic` only, and fix Gitea wrapper scripts so merge/CI/issue operations work reliably when tea needs explicit repo/login context.
- Scope:
- `packages/mosaic/src/runtime/update-checker.ts`
- `packages/mosaic/__tests__/update-checker.test.ts`
- any package metadata/version bumps needed
- repo-source git wrappers under `packages/mosaic/framework/tools/git/`
- Constraints:
- Jason approved breaking changes; legacy `@mosaic/cli` support is out of scope.
- Jason approved breaking changes; legacy `@mosaicstack/cli` support is out of scope.
- Keep changes focused and mergeable.
- Acceptance:
- updater only targets `@mosaic/mosaic`
- updater only targets `@mosaicstack/mosaic`
- wrapper path works on Gitea in this environment without manual repo guessing
- PR merges squash-only after green CI
@@ -20,9 +20,9 @@
#### Update Checker Simplification (DONE)
- Removed `LEGACY_PKG`, `INSTALLED_PACKAGE_ORDER` constants — only `PKG = '@mosaic/mosaic'` remains
- `getInstalledVersion()` — removed loop over multiple packages, only checks `@mosaic/mosaic`
- `getLatestVersion()` — removed `installedPackage` parameter and candidate iteration; single query for `@mosaic/mosaic`
- Removed `LEGACY_PKG`, `INSTALLED_PACKAGE_ORDER` constants — only `PKG = '@mosaicstack/mosaic'` remains
- `getInstalledVersion()` — removed loop over multiple packages, only checks `@mosaicstack/mosaic`
- `getLatestVersion()` — removed `installedPackage` parameter and candidate iteration; single query for `@mosaicstack/mosaic`
- `checkForUpdate()` — removed `currentPackage`-based cache key comparison; cache is now package-agnostic
- `RegistryCache` — removed `currentPackage` and `targetPackage` fields
- `formatUpdateNotice()` — removed `targetChanged` branch (package migration notice no longer relevant)
@@ -30,9 +30,9 @@
#### Test Updates (DONE)
- Removed legacy `@mosaic/cli` fallback test
- Removed legacy `@mosaicstack/cli` fallback test
- Removed cache cross-contamination test (was testing legacy→modern package transition)
- Added `does not query legacy @mosaic/cli package` test — asserts no `@mosaic/cli` npm commands are issued
- Added `does not query legacy @mosaicstack/cli package` test — asserts no `@mosaicstack/cli` npm commands are issued
- Added `returns empty result when package is not installed` test
- All 8 tests pass ✅

View File

@@ -10,15 +10,15 @@
- 2026-03-13: session started in worktree; loading gateway/plugin package context.
- 2026-03-13: implemented initial plugin module, service, interface, and AppModule wiring; pending verification.
- 2026-03-13: added `@mosaic/discord-plugin` as a gateway workspace dependency and regenerated `pnpm-lock.yaml`.
- 2026-03-13: added `@mosaicstack/discord-plugin` as a gateway workspace dependency and regenerated `pnpm-lock.yaml`.
- 2026-03-13: built gateway dependency chain so workspace packages exported `dist/*` for clean TypeScript resolution in this fresh worktree.
- 2026-03-13: verification complete.
## Verification
- `pnpm --filter @mosaic/gateway... build`
- `pnpm --filter @mosaic/gateway typecheck`
- `pnpm --filter @mosaic/gateway lint`
- `pnpm --filter @mosaicstack/gateway... build`
- `pnpm --filter @mosaicstack/gateway typecheck`
- `pnpm --filter @mosaicstack/gateway lint`
- `pnpm format:check`
- `pnpm typecheck`
- `pnpm lint`

View File

@@ -21,7 +21,7 @@
- `pnpm typecheck`
- `pnpm format:check`
- `docker compose up -d`
- `pnpm --filter @mosaic/db db:push`
- `pnpm --filter @mosaicstack/db db:push`
- `pnpm test`
- `pnpm build`
- Manual review of `.woodpecker/ci.yml` diff: publish steps are main-only, depend on `build`, and use secret-backed registry auth plus dual tags.

View File

@@ -46,7 +46,7 @@ Complete the remaining gateway security hardening work:
## Verification Log
- `pnpm --filter @mosaic/gateway test -- src/chat/__tests__/chat-security.test.ts src/__tests__/resource-ownership.test.ts`
- `pnpm --filter @mosaicstack/gateway test -- src/chat/__tests__/chat-security.test.ts src/__tests__/resource-ownership.test.ts`
- Red: failed on socket session reshaping and DTO role/length mismatches.
- Green: passed with 3 test files and 20 tests passing.
- `pnpm typecheck`

View File

@@ -6,7 +6,7 @@ Refactor ProviderService into an IProviderAdapter pattern without breaking exist
## Plan
1. Add `IProviderAdapter` interface and supporting types to `@mosaic/types` provider package
1. Add `IProviderAdapter` interface and supporting types to `@mosaicstack/types` provider package
2. Create `apps/gateway/src/agent/adapters/` directory with:
- `provider-adapter.interface.ts` — IProviderAdapter + ProviderHealth + CompletionParams + CompletionEvent
- `ollama.adapter.ts` — extract existing Ollama logic
@@ -40,7 +40,7 @@ Refactor ProviderService into an IProviderAdapter pattern without breaking exist
## Progress
- [ ] Add types to @mosaic/types
- [ ] Add types to @mosaicstack/types
- [ ] Create adapters/ directory
- [ ] Create IProviderAdapter interface file
- [ ] Create OllamaAdapter

View File

@@ -37,11 +37,11 @@ User confirmed: start the planning gate.
## Session Log
| Session | Date | Milestone | Tasks Done | Outcome |
| ------- | ---------- | -------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | 2026-03-13 | Planning | Planning gate | Milestones created, 59 issues created, TASKS.md populated, manifest updated |
| 2 | 2026-03-13 | Vertical slice | P1-001, P1-007, P1-008, P2-001, P5-002, P6-005 | Communication spine built and merged (PR #61). Gateway + TUI + Discord. 3-agent gatekeeper review, 10/16 issues remediated, 4 deferred. |
| 3 | 2026-03-13 | Foundation | P0-002, P0-005, P0-006 | Foundation layer merged (PR #65). Docker Compose (PG+pgvector, Valkey, OTEL Collector, Jaeger), OTEL auto-instrumentation in gateway, @mosaic/types with DTOs + Socket.IO typed event maps. |
| Session | Date | Milestone | Tasks Done | Outcome |
| ------- | ---------- | -------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 1 | 2026-03-13 | Planning | Planning gate | Milestones created, 59 issues created, TASKS.md populated, manifest updated |
| 2 | 2026-03-13 | Vertical slice | P1-001, P1-007, P1-008, P2-001, P5-002, P6-005 | Communication spine built and merged (PR #61). Gateway + TUI + Discord. 3-agent gatekeeper review, 10/16 issues remediated, 4 deferred. |
| 3 | 2026-03-13 | Foundation | P0-002, P0-005, P0-006 | Foundation layer merged (PR #65). Docker Compose (PG+pgvector, Valkey, OTEL Collector, Jaeger), OTEL auto-instrumentation in gateway, @mosaicstack/types with DTOs + Socket.IO typed event maps. |
### Session 4 — Docker Compose fix
@@ -94,9 +94,9 @@ User confirmed: start the planning gate.
**Phase 6 details:**
- P6-002: @mosaic/prdy migrated from v0 (~400 LOC). PR #101.
- P6-003: @mosaic/quality-rails migrated from v0 (~500 LOC). PR #100.
- P6-004: @mosaic/mosaic wizard migrated from v0 (2272 LOC, 28 files). PR #103.
- P6-002: @mosaicstack/prdy migrated from v0 (~400 LOC). PR #101.
- P6-003: @mosaicstack/quality-rails migrated from v0 (~500 LOC). PR #100.
- P6-004: @mosaicstack/mosaic wizard migrated from v0 (2272 LOC, 28 files). PR #103.
- P6-001: CLI subcommands wired — tui, prdy, quality-rails, wizard all working. PR #104.
- BUG-1: PLUGIN_REGISTRY circular import fixed via plugin.tokens.ts. PR #102.
- BUG-2: AuthStorage.create() → .inMemory() to prevent silent exit. PR #102.
@@ -151,11 +151,11 @@ User confirmed: start the planning gate.
| ---- | -------------------------------------------------------------------- | ------------------------ |
| 1 | P0-001: Scaffold monorepo | Build system works |
| 2 | P0-005: Docker Compose (PG + Valkey) | Infrastructure runs |
| 3 | P0-002: @mosaic/types (minimal — gateway, agent, chat types) | Shared contracts |
| 3 | P0-002: @mosaicstack/types (minimal — gateway, agent, chat types) | Shared contracts |
| 4 | P1-001: Gateway scaffold (minimal NestJS + Fastify) | API surface boots |
| 5 | P1-007: WebSocket server (chat streaming) | Real-time channel works |
| 6 | P1-008: Basic agent dispatch (single provider) | LLM responds |
| 7 | P2-001: @mosaic/agent — Pi SDK integration (minimal) | Pi sessions work |
| 7 | P2-001: @mosaicstack/agent — Pi SDK integration (minimal) | Pi sessions work |
| 8 | P6-005: Pi TUI integration (mosaic tui → gateway) | TUI ↔ Gateway proven |
| 9 | P5-001: Plugin host (channel plugin interface) | Plugin arch works |
| 10 | P5-002: Discord plugin (bot + channel) | Discord ↔ Gateway proven |
@@ -175,9 +175,9 @@ User confirmed: start the planning gate.
### Session 10 (continued) — Phase 4 Memory & Intelligence
| Session | Date | Milestone | Tasks Done | Outcome |
| ------- | ---------- | --------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 10 | 2026-03-13 | Phase 4 | P4-001 through P4-007 | Full memory + log system: DB schema (preferences, insights w/ pgvector, agent_logs, skills, summarization_jobs), @mosaic/memory + @mosaic/log packages, embedding service, summarization pipeline w/ cron, memory tools in agent sessions, skill management CRUD. All gates green. |
| Session | Date | Milestone | Tasks Done | Outcome |
| ------- | ---------- | --------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 10 | 2026-03-13 | Phase 4 | P4-001 through P4-007 | Full memory + log system: DB schema (preferences, insights w/ pgvector, agent_logs, skills, summarization_jobs), @mosaicstack/memory + @mosaicstack/log packages, embedding service, summarization pipeline w/ cron, memory tools in agent sessions, skill management CRUD. All gates green. |
### Session 12 — Phase 7 planning + execution start

View File

@@ -2,7 +2,7 @@
## Objective
Implement `@mosaic/telegram-plugin` by matching the established Discord plugin pattern with Telegraf + socket.io-client, add package docs, and pass package typecheck/lint.
Implement `@mosaicstack/telegram-plugin` by matching the established Discord plugin pattern with Telegraf + socket.io-client, add package docs, and pass package typecheck/lint.
## Requirements Source
@@ -34,13 +34,13 @@ manual structural parity with the Discord plugin.
## Progress Log
- 2026-03-13: Loaded Mosaic/global/repo guidance, mission files, Discord reference implementation, and Telegram package scaffold.
- 2026-03-13: Added `telegraf` and `socket.io-client` to `@mosaic/telegram-plugin`.
- 2026-03-13: Added `telegraf` and `socket.io-client` to `@mosaicstack/telegram-plugin`.
- 2026-03-13: Implemented Telegram message forwarding, gateway streaming accumulation, response chunking, and package README.
## Verification Evidence
- `pnpm --filter @mosaic/telegram-plugin typecheck` → pass
- `pnpm --filter @mosaic/telegram-plugin lint` → pass
- `pnpm --filter @mosaicstack/telegram-plugin typecheck` → pass
- `pnpm --filter @mosaicstack/telegram-plugin lint` → pass
- `pnpm typecheck` → pass
- `pnpm lint` → pass

View File

@@ -18,21 +18,21 @@
4. Confirmed `packages/auth/src/index.ts` already exports `AuthConfig`; no change required there.
- Verification:
1. `pnpm --filter @mosaic/db build`
2. `pnpm --filter @mosaic/auth typecheck`
3. `pnpm --filter @mosaic/gateway typecheck`
1. `pnpm --filter @mosaicstack/db build`
2. `pnpm --filter @mosaicstack/auth typecheck`
3. `pnpm --filter @mosaicstack/gateway typecheck`
4. `pnpm lint`
5. `pnpm format:check`
6. `pnpm --filter @mosaic/auth test`
7. `pnpm --filter @mosaic/gateway test`
6. `pnpm --filter @mosaicstack/auth test`
7. `pnpm --filter @mosaicstack/gateway test`
- Results:
1. `@mosaic/auth` typecheck passed after replacing the non-existent `enabled` field with conditional plugin registration.
2. `@mosaic/gateway` typecheck passed.
1. `@mosaicstack/auth` typecheck passed after replacing the non-existent `enabled` field with conditional plugin registration.
2. `@mosaicstack/gateway` typecheck passed.
3. Repo lint passed.
4. Prettier check passed after formatting `apps/gateway/src/main.ts`.
5. `@mosaic/auth` tests reported `No test files found, exiting with code 0`.
6. `@mosaic/gateway` tests passed: `3` files, `20` tests.
5. `@mosaicstack/auth` tests reported `No test files found, exiting with code 0`.
6. `@mosaicstack/gateway` tests passed: `3` files, `20` tests.
- Review:
1. Manual review of the diff found no blocker issues.

View File

@@ -50,16 +50,16 @@ Add WorkOS and Keycloak as optional SSO providers to the BetterAuth configuratio
## Quality Gate Results
| Gate | Status |
| ------------------- | -------------------------------------------- |
| typecheck | ✅ 32/32 cached green |
| lint | ✅ 18/18 cached green |
| format:check | ✅ All matched files use Prettier code style |
| test (@mosaic/auth) | ✅ 8/8 tests passed |
| Gate | Status |
| ------------------------ | -------------------------------------------- |
| typecheck | ✅ 32/32 cached green |
| lint | ✅ 18/18 cached green |
| format:check | ✅ All matched files use Prettier code style |
| test (@mosaicstack/auth) | ✅ 8/8 tests passed |
## Verification Evidence
- `pnpm typecheck` — FULL TURBO, 32 tasks successful
- `pnpm lint` — FULL TURBO, 18 tasks successful
- `pnpm format:check` — All matched files use Prettier code style!
- `pnpm --filter=@mosaic/auth test` — 8 tests passed, 0 failed
- `pnpm --filter=@mosaicstack/auth test` — 8 tests passed, 0 failed

View File

@@ -12,7 +12,7 @@
## Key Observations
- CommandDef in @mosaic/types does NOT have `category` field — will omit from LOCAL_COMMANDS
- CommandDef in @mosaicstack/types does NOT have `category` field — will omit from LOCAL_COMMANDS
- CommandDef.args is `CommandArgDef[] | undefined`, not `{ usage: string }` — help.ts args rendering needs adjustment
- Message role union currently: 'user' | 'assistant' | 'thinking' | 'tool' — adding 'system'
- InputBar currently takes `onSubmit: (value: string) => void` — need to add slash command interception

View File

@@ -35,14 +35,14 @@ Close ownership gaps so task listing/creation and mission creation enforce proje
## Verification Log
- `pnpm --filter @mosaic/gateway test -- src/__tests__/resource-ownership.test.ts`
- `pnpm --filter @mosaicstack/gateway test -- src/__tests__/resource-ownership.test.ts`
- Red: failed with 2 expected permission-path failures before controller changes.
- Green: passed after wiring ownership checks and adding owned-task filtering coverage.
- `pnpm --filter @mosaic/gateway typecheck`
- `pnpm --filter @mosaicstack/gateway typecheck`
- Pass on 2026-03-13 after fixing parameter ordering and mission project nullability.
- `pnpm --filter @mosaic/gateway lint`
- `pnpm --filter @mosaicstack/gateway lint`
- Pass on 2026-03-13.
- `pnpm --filter @mosaic/gateway test`
- `pnpm --filter @mosaicstack/gateway test`
- Pass on 2026-03-13 with 3 test files and 23 tests passing.
- `pnpm format:check`
- Pass on 2026-03-13.

View File

@@ -1,27 +1,27 @@
# Scratchpad — updater package target fix (#382)
- Objective: Fix `mosaic update` so modern installs query `@mosaic/mosaic` instead of stale `@mosaic/cli`.
- Objective: Fix `mosaic update` so modern installs query `@mosaicstack/mosaic` instead of stale `@mosaicstack/cli`.
- Scope: updater logic, user-facing update/install hints, tests, package version bump(s).
- Constraints: preserve backward compatibility for older `@mosaic/cli` installs if practical.
- Constraints: preserve backward compatibility for older `@mosaicstack/cli` installs if practical.
- Acceptance:
- fresh installs using `@mosaic/mosaic` report latest correctly
- fresh installs using `@mosaicstack/mosaic` report latest correctly
- older installs do not regress unnecessarily
- tests cover package lookup behavior
- release version bumped for changed package(s)
## Decisions
- Prefer `@mosaic/mosaic` when both modern and legacy packages are installed globally.
- For legacy `@mosaic/cli` installs, query `@mosaic/cli` first, then fall back to `@mosaic/mosaic` if the legacy package is not published.
- Prefer `@mosaicstack/mosaic` when both modern and legacy packages are installed globally.
- For legacy `@mosaicstack/cli` installs, query `@mosaicstack/cli` first, then fall back to `@mosaicstack/mosaic` if the legacy package is not published.
- Share install-target selection from `packages/mosaic` so both the consolidated CLI and the legacy `packages/cli` entrypoint print/install the same package target.
- Extend the update cache to persist the resolved target package as well as the version so cached checks preserve the migration target.
## Validation
- `pnpm install`
- `pnpm --filter @mosaic/mosaic test -- __tests__/update-checker.test.ts`
- `pnpm --filter @mosaicstack/mosaic test -- __tests__/update-checker.test.ts`
- `pnpm exec eslint --no-warn-ignored packages/mosaic/src/runtime/update-checker.ts packages/mosaic/src/cli.ts packages/mosaic/src/index.ts packages/mosaic/__tests__/update-checker.test.ts packages/cli/src/cli.ts`
- `pnpm --filter @mosaic/mosaic lint`
- `pnpm --filter @mosaicstack/mosaic lint`
- pre-push hooks: `typecheck`, `lint`, `format:check`
## Review
@@ -30,5 +30,5 @@
## Risks / Notes
- Direct `pnpm --filter @mosaic/mosaic typecheck` and `pnpm --filter @mosaic/cli ...` checks were not representative in this worktree because `packages/cli` is excluded from `pnpm-workspace.yaml` and the standalone package check lacked the built workspace dependency graph.
- Direct `pnpm --filter @mosaicstack/mosaic typecheck` and `pnpm --filter @mosaicstack/cli ...` checks were not representative in this worktree because `packages/cli` is excluded from `pnpm-workspace.yaml` and the standalone package check lacked the built workspace dependency graph.
- The repo's pre-push hooks provided the authoritative validation path here and passed: root `typecheck`, `lint`, and `format:check`.