- BrainModule provides Brain instance to all gateway controllers
- ConversationsController: CRUD + message listing/creation
- ProjectsController: CRUD with owner assignment
- MissionsController: CRUD with project association
- TasksController: CRUD with project/mission/status filtering
- All routes guarded by AuthGuard (BetterAuth session validation)
- DTOs at module boundaries per project convention
Closes#14, Closes#15
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pi SDK is ESM-only. tsx (esbuild) doesn't emit decorator metadata,
so NestJS constructor injection fails without explicit @Inject().
- Set "type": "module" in gateway package.json
- Switch tsconfig to NodeNext module resolution
- Add @Inject(AgentService) to ChatController and ChatGateway
Tested end-to-end: REST /api/chat → Pi SDK → Anthropic → response OK.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>