refactor: Restructure monorepo to apps/server/ and apps/web/ layout
Move src/ → apps/server/ and packages/web/ → apps/web/ to adopt standard monorepo conventions (apps/ for runnable apps, packages/ for reusable libraries). Update all config files, shared package imports, test fixtures, and documentation to reflect new paths. Key fixes: - Update workspace config to ["apps/*", "packages/*"] - Update tsconfig.json rootDir/include for apps/server/ - Add apps/web/** to vitest exclude list - Update drizzle.config.ts schema path - Fix ensure-schema.ts migration path detection (3 levels up in dev, 2 levels up in dist) - Fix tests/integration/cli-server.test.ts import paths - Update packages/shared imports to apps/server/ paths - Update all docs/ files with new paths
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
Three infrastructure modules supporting agent execution.
|
||||
|
||||
## Git Module (`src/git/`)
|
||||
## Git Module (`apps/server/git/`)
|
||||
|
||||
Manages git worktrees for isolated agent workspaces.
|
||||
|
||||
@@ -31,7 +31,7 @@ Worktrees stored in `.cw-worktrees/` subdirectory of the repo. Each agent gets a
|
||||
4. On conflict: `git merge --abort`, emit `worktree:conflict` with conflicting file list
|
||||
5. Restore original branch
|
||||
|
||||
### BranchManager (`src/git/branch-manager.ts`)
|
||||
### BranchManager (`apps/server/git/branch-manager.ts`)
|
||||
- **Port**: `BranchManager` interface
|
||||
- **Adapter**: `SimpleGitBranchManager` using simple-git
|
||||
|
||||
@@ -56,7 +56,7 @@ Worktrees stored in `.cw-worktrees/` subdirectory of the repo. Each agent gets a
|
||||
|
||||
---
|
||||
|
||||
## Process Module (`src/process/`)
|
||||
## Process Module (`apps/server/process/`)
|
||||
|
||||
Spawns, tracks, and controls child processes.
|
||||
|
||||
@@ -85,13 +85,13 @@ Spawns, tracks, and controls child processes.
|
||||
|
||||
---
|
||||
|
||||
## Logger Module (`src/logger/`)
|
||||
## Logger Module (`apps/server/logger/`)
|
||||
|
||||
Structured logging via **pino**.
|
||||
|
||||
### Usage
|
||||
```typescript
|
||||
import { createModuleLogger } from './logger/index.js';
|
||||
import { createModuleLogger } from '../logger/index.js';
|
||||
const log = createModuleLogger('my-module');
|
||||
log.info({ key: 'value' }, 'message');
|
||||
```
|
||||
@@ -109,7 +109,7 @@ log.info({ key: 'value' }, 'message');
|
||||
|
||||
---
|
||||
|
||||
## Logging Module (`src/logging/`)
|
||||
## Logging Module (`apps/server/logging/`)
|
||||
|
||||
File-based per-process output capture (separate from pino).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user