refactor: rename inner-loop-tracker to ralph-tracker with API improvements

- Rename inner-loop-tracker.ts → ralph-tracker.ts throughout codebase
- Add ralph-config.ts for parsing .claude/ralph-loop.local.md config
- Standardize API error responses using createErrorResponse()
- Add input validation for auto-compact/auto-clear thresholds
- Update UI labels to "Ralph / Todo Tracker" consistently
- Add 46 integration tests for Ralph tracking functionality
- Update test badge to 438 total tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-21 22:36:45 +01:00
co-authored by Claude Opus 4.5
parent 5be0babf01
commit 0d1ca37b6e
21 changed files with 2151 additions and 451 deletions
+8 -8
View File
@@ -9,8 +9,8 @@ import { describe, it, expect } from 'vitest';
import {
createErrorResponse,
createSuccessResponse,
createInitialInnerLoopState,
createInitialInnerSessionState,
createInitialRalphTrackerState,
createInitialRalphSessionState,
createInitialState,
ErrorMessages,
} from '../src/types.js';
@@ -69,9 +69,9 @@ describe('types utility functions', () => {
});
});
describe('createInitialInnerLoopState', () => {
it('should create initial inner loop state', () => {
const state = createInitialInnerLoopState();
describe('createInitialRalphTrackerState', () => {
it('should create initial Ralph tracker state', () => {
const state = createInitialRalphTrackerState();
expect(state.enabled).toBe(false);
expect(state.active).toBe(false);
@@ -84,9 +84,9 @@ describe('types utility functions', () => {
});
});
describe('createInitialInnerSessionState', () => {
it('should create initial inner session state with session ID', () => {
const state = createInitialInnerSessionState('session-123');
describe('createInitialRalphSessionState', () => {
it('should create initial Ralph session state with session ID', () => {
const state = createInitialRalphSessionState('session-123');
expect(state.sessionId).toBe('session-123');
expect(state.loop).toBeDefined();