From 0876c2d4e94b23cb2868ac46d0909f8d0e4a8040 Mon Sep 17 00:00:00 2001 From: arkon Date: Mon, 19 Jan 2026 02:07:46 +0100 Subject: [PATCH] docs: add Type Definitions section to CLAUDE.md Document the centralized TypeScript interfaces in src/types.ts including core state types, configuration types, and API error handling. Co-Authored-By: Claude Opus 4.5 --- CLAUDE.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index b6fa0d2b..ee915467 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -62,6 +62,14 @@ src/ - **WebServer** (`src/web/server.ts`): Fastify server with REST API + SSE. Manages sessions, scheduled runs, respawn controllers, and case directories. Broadcasts all events to connected clients. +### Type Definitions + +All TypeScript interfaces are centralized in `src/types.ts`: +- `SessionState`, `TaskState`, `RalphLoopState` - Core state types +- `RespawnConfig`, `AppConfig` - Configuration types +- `ApiErrorCode`, `createErrorResponse()` - Consistent API error handling +- Request/Response types for API endpoints (`CreateSessionRequest`, `QuickStartResponse`, etc.) + ### Session Modes **One-Shot Mode** (`runPrompt(prompt)`):