mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-08 16:39:42 +02:00
chore: rename Claudeman to Codeman
Full product rename across 109 files (~834 occurrences): - Env vars: CLAUDEMAN_* → CODEMAN_* - Data dirs: ~/.claudeman/ → ~/.codeman/, ~/claudeman-cases/ → ~/codeman-cases/ - tmux prefix: claudeman- → codeman- - localStorage: claudeman-* → codeman-* - Package/CLI: claudeman → codeman - GitHub repo: Ark0N/Claudeman → Ark0N/Codeman - systemd service: claudeman-web → codeman-web - Class: ClaudemanApp → CodemanApp Migration infrastructure for seamless transition: - state-store.ts: auto-migrates data directories on startup - tmux-manager.ts: dual-prefix detection (legacy claudeman- sessions) - app.js: localStorage key migration (preserves old keys) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+19
-3
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* @fileoverview Persistent JSON state storage for Claudeman.
|
||||
* @fileoverview Persistent JSON state storage for Codeman.
|
||||
*
|
||||
* This module provides the StateStore class which persists application state
|
||||
* to `~/.claudeman/state.json` with debounced writes to prevent excessive disk I/O.
|
||||
* to `~/.codeman/state.json` with debounced writes to prevent excessive disk I/O.
|
||||
*
|
||||
* State is split into two files:
|
||||
* - `state.json`: Main app state (sessions, tasks, config)
|
||||
@@ -68,7 +68,23 @@ export class StateStore {
|
||||
private _saveInFlight: Promise<void> | null = null;
|
||||
|
||||
constructor(filePath?: string) {
|
||||
this.filePath = filePath || join(homedir(), '.claudeman', 'state.json');
|
||||
// Migrate legacy data directory (~/.claudeman → ~/.codeman)
|
||||
if (!filePath) {
|
||||
const legacyDir = join(homedir(), '.claudeman');
|
||||
const newDir = join(homedir(), '.codeman');
|
||||
if (existsSync(legacyDir) && !existsSync(newDir)) {
|
||||
console.log(`[state-store] Migrating data directory: ${legacyDir} → ${newDir}`);
|
||||
renameSync(legacyDir, newDir);
|
||||
}
|
||||
const legacyCasesDir = join(homedir(), 'claudeman-cases');
|
||||
const newCasesDir = join(homedir(), 'codeman-cases');
|
||||
if (existsSync(legacyCasesDir) && !existsSync(newCasesDir)) {
|
||||
console.log(`[state-store] Migrating cases directory: ${legacyCasesDir} → ${newCasesDir}`);
|
||||
renameSync(legacyCasesDir, newCasesDir);
|
||||
}
|
||||
}
|
||||
|
||||
this.filePath = filePath || join(homedir(), '.codeman', 'state.json');
|
||||
this.ralphStatePath = this.filePath.replace('.json', '-inner.json');
|
||||
this.state = this.load();
|
||||
this.state.config.stateFilePath = this.filePath;
|
||||
|
||||
Reference in New Issue
Block a user