feat(FN-1644): rename default global data directory from ~/.pi/fusion to ~/.fusion

- Change default global directory from ~/.pi/fusion to ~/.fusion
- Add migration logic to copy existing data from old directory to new location
- Update all core packages (store, settings, central-core, central-db) to use new default path
- Update all documentation references from ~/.pi/fusion to ~/.fusion
- Add test for ~/.pi/fusion migration path with updated mock paths
- Include changeset for @gsxdsm/fusion minor version bump
This commit is contained in:
Fusion
2026-04-15 13:33:27 -07:00
committed by gsxdsm
parent d6681d0dc8
commit e874a3ca06
24 changed files with 107 additions and 48 deletions

View File

@@ -49,7 +49,7 @@ At a high level, Fusion is split into:
│ Persistence │
│ - .fusion/fusion.db (SQLite/WAL)
│ - .fusion/tasks/* (PROMPT/logs)
│ - ~/.pi/fusion/fusion-central.db │
│ - ~/.fusion/fusion-central.db │
└──────────────────────────────────┘
```
@@ -134,7 +134,7 @@ Concrete references:
- Exported from `@fusion/core` for downstream persistence/API/UI work
- **CentralCore**: `packages/core/src/central-core.ts`
- Global project registry, health, central activity feed, global concurrency
- Backed by `packages/core/src/central-db.ts` (`~/.pi/fusion/fusion-central.db`)
- Backed by `packages/core/src/central-db.ts` (`~/.fusion/fusion-central.db`)
- **Specialized stores**:
- `AgentStore` (`agent-store.ts`) — filesystem-based agent metadata + heartbeat run history
- `MissionStore` (`mission-store.ts`) — mission/milestone/slice/feature hierarchy
@@ -383,7 +383,7 @@ SQLite schema is initialized in `packages/core/src/db.ts` and uses:
- `__meta.lastModified` for change detection/polling
### Central storage (multi-project)
- **Central DB**: `~/.pi/fusion/fusion-central.db`
- **Central DB**: `~/.fusion/fusion-central.db`
- Schema in `packages/core/src/central-db.ts`
- `projects`, `projectHealth`, `centralActivityLog`, `globalConcurrency`, `nodes`, `__meta`
@@ -542,7 +542,7 @@ In `packages/engine/src/ipc/ipc-protocol.ts`:
Settings are split by scope.
### Global scope
- File: `~/.pi/fusion/settings.json`
- File: `~/.fusion/settings.json`
- Managed by `GlobalSettingsStore` (`packages/core/src/global-settings.ts`)
- Examples: `themeMode`, `colorTheme`, default model/provider, notification preferences

View File

@@ -44,7 +44,7 @@ Method used:
- **High**
- `packages/dashboard/src/subtask-breakdown.ts` — AI/session orchestration and persistence interactions; only route-level behavior is exercised.
- `packages/dashboard/src/terminal.ts` — command validation + process spawning module has no tests and currently appears unused (no imports found), increasing drift risk.
- `packages/dashboard/src/script-store.ts` — file persistence logic under `~/.pi/fusion/scripts.json` has no direct tests.
- `packages/dashboard/src/script-store.ts` — file persistence logic under `~/.fusion/scripts.json` has no direct tests.
- **Medium**
- `packages/dashboard/src/mission-routes.ts` — no dedicated unit test file, but substantial endpoint coverage exists via `mission-e2e.test.ts`.
- `packages/engine/src/github.ts` — git remote parsing helper has no direct test despite influencing scheduler GitHub linking behavior.

View File

@@ -16,7 +16,7 @@ Use multi-project mode when you need to:
Multi-project metadata is stored in:
`~/.pi/fusion/fusion-central.db`
`~/.fusion/fusion-central.db`
Core tables:
@@ -86,7 +86,7 @@ Migration is idempotent and designed to avoid repeated re-registration.
If central registry behavior needs to be reverted:
1. Delete `~/.pi/fusion/fusion-central.db`
1. Delete `~/.fusion/fusion-central.db`
2. Keep using per-project `.fusion/fusion.db` data
3. Fusion falls back to legacy/single-project behavior
4. Re-register projects later with `fn init` / `fn project add`

View File

@@ -8,7 +8,7 @@ This guide documents Fusion settings from `packages/core/src/types.ts`.
Fusion uses a two-tier settings system:
- **Global settings** (`~/.pi/fusion/settings.json`): user preferences shared across projects
- **Global settings** (`~/.fusion/settings.json`): user preferences shared across projects
- **Project settings** (`.fusion/config.json`): execution/runtime behavior for one project
At runtime, settings are merged. **Project settings override global settings** when keys overlap.

View File

@@ -56,7 +56,7 @@ API endpoints reviewed:
- `PUT /api/settings/global`
- `GET /api/settings/scopes`
### 3.1 Global settings (`~/.pi/fusion/settings.json`)
### 3.1 Global settings (`~/.fusion/settings.json`)
| Setting Key | Scope | API Endpoint | Description |
|---|---|---|---|