fix: rename all packages from @mosaic/* to @mosaicstack/*
- 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:
@@ -12,9 +12,9 @@ context: Agents coupled directly to infrastructure backends, bypassing intended
|
||||
Current packages are **direct adapters**, not **middleware**:
|
||||
| Package | Current State | Intended Design |
|
||||
|---------|---------------|-----------------|
|
||||
| `@mosaic/queue` | `ioredis` hardcoded | Interface → BullMQ OR local-files |
|
||||
| `@mosaic/db` | Drizzle + Postgres hardcoded | Interface → Postgres OR SQLite OR JSON/MD |
|
||||
| `@mosaic/memory` | pgvector required | Interface → pgvector OR sqlite-vec OR keyword-search |
|
||||
| `@mosaicstack/queue` | `ioredis` hardcoded | Interface → BullMQ OR local-files |
|
||||
| `@mosaicstack/db` | Drizzle + Postgres hardcoded | Interface → Postgres OR SQLite OR JSON/MD |
|
||||
| `@mosaicstack/memory` | pgvector required | Interface → pgvector OR sqlite-vec OR keyword-search |
|
||||
|
||||
## The gateway and TUI import these packages directly, which means they they're coupled to specific infrastructure. Users cannot run Mosaic Stack without Postgres + Valkey.
|
||||
|
||||
@@ -46,15 +46,15 @@ The gateway imports the interface, not the backend. At startup it reads config a
|
||||
|
||||
```typescript
|
||||
// What should have happened:
|
||||
gateway/queue.service.ts → @mosaic/queue (interface) → queue.adapter.ts
|
||||
gateway/queue.service.ts → @mosaicstack/queue (interface) → queue.adapter.ts
|
||||
|
||||
// What actually happened:
|
||||
gateway/queue.service.ts → @mosaic/queue → ioredis (hardcoded)
|
||||
gateway/queue.service.ts → @mosaicstack/queue → ioredis (hardcoded)
|
||||
```
|
||||
|
||||
## The Current State Analysis
|
||||
|
||||
### `@mosaic/queue` (packages/queue/src/queue.ts)
|
||||
### `@mosaicstack/queue` (packages/queue/src/queue.ts)
|
||||
|
||||
```typescript
|
||||
import Redis from 'ioredis'; // ← Direct import of backend
|
||||
@@ -68,7 +68,7 @@ export function createQueue(config?: QueueConfig): QueueHandle {
|
||||
|
||||
**Problem:** `ioredis` is imported in the package, not the adapter interface. Consumers cannot swap backends.
|
||||
|
||||
### `@mosaic/db` (packages/db/src/client.ts)
|
||||
### `@mosaicstack/db` (packages/db/src/client.ts)
|
||||
|
||||
```typescript
|
||||
import { drizzle, type PostgresJsDatabase } from 'drizzle-orm/postgres-js';
|
||||
@@ -84,10 +84,10 @@ export function createDb(url?: string): DbHandle {
|
||||
|
||||
**Problem:** Drizzle + Postgres is hardcoded. No SQLite, JSON, or file-based options.
|
||||
|
||||
### `@mosaic/memory` (packages/memory/src/memory.ts)
|
||||
### `@mosaicstack/memory` (packages/memory/src/memory.ts)
|
||||
|
||||
```typescript
|
||||
import type { Db } from '@mosaic/db'; // ← Depends on Drizzle/PG
|
||||
import type { Db } from '@mosaicstack/db'; // ← Depends on Drizzle/PG
|
||||
|
||||
export function createMemory(db: Db): Memory {
|
||||
return {
|
||||
@@ -97,7 +97,7 @@ export function createMemory(db: Db): Memory {
|
||||
}
|
||||
```
|
||||
|
||||
**Problem:** Memory package is tightly coupled to `@mosaic/db` (which is Postgres-only). No alternative storage backends.
|
||||
**Problem:** Memory package is tightly coupled to `@mosaicstack/db` (which is Postgres-only). No alternative storage backends.
|
||||
|
||||
## The Target Interfaces
|
||||
|
||||
@@ -361,7 +361,7 @@ Automated equivalent to Claude Code's "Dream: Memory Consolidation" cycle
|
||||
**Implementation:**
|
||||
|
||||
```typescript
|
||||
// In @mosaic/dream (new package)
|
||||
// In @mosaicstack/dream (new package)
|
||||
export async function runDreamCycle(config: DreamConfig): Promise<DreamResult> {
|
||||
const memory = await loadMemoryAdapter(config.storage);
|
||||
|
||||
@@ -420,7 +420,7 @@ export async function runDreamCycle(config: DreamConfig): Promise<DreamResult> {
|
||||
2. Move Drizzle logic to `packages/storage/src/adapters/postgres.ts`
|
||||
3. Create SQLite adapter in `packages/storage/src/adapters/sqlite.ts`
|
||||
4. Update gateway to use storage factory
|
||||
5. Deprecate direct `@mosaic/db` imports
|
||||
5. Deprecate direct `@mosaicstack/db` imports
|
||||
|
||||
#### 2.3 Memory Refactor
|
||||
|
||||
@@ -488,7 +488,7 @@ packages/
|
||||
│ │ ├── types.ts # StorageAdapter interface
|
||||
│ │ ├── index.ts # Factory function
|
||||
│ │ └── adapters/
|
||||
│ │ ├── postgres.ts # MOVED from @mosaic/db
|
||||
│ │ ├── postgres.ts # MOVED from @mosaicstack/db
|
||||
│ │ ├── sqlite.ts # NEW: SQLite adapter
|
||||
│ │ └── files.ts # NEW: JSON/MD adapter
|
||||
│ └── package.json
|
||||
@@ -530,9 +530,9 @@ packages/
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
1. **`@mosaic/db`** → **`@mosaic/storage`** (with migration guide)
|
||||
2. Direct `ioredis` imports → Use `@mosaic/queue` factory
|
||||
3. Direct `pgvector` queries → Use `@mosaic/memory` factory
|
||||
1. **`@mosaicstack/db`** → **`@mosaicstack/storage`** (with migration guide)
|
||||
2. Direct `ioredis` imports → Use `@mosaicstack/queue` factory
|
||||
3. Direct `pgvector` queries → Use `@mosaicstack/memory` factory
|
||||
4. Gateway startup now requires storage config (defaults to local)
|
||||
|
||||
## Non-Breaking Migration Path
|
||||
|
||||
Reference in New Issue
Block a user