mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-04 14:39:42 +02:00
feat: persist full session state to state.json for CLI visibility
The web server now persists all per-session settings (name, mode, auto-compact, auto-clear, respawn config, ralph state, tokens, cost) to state.json so the CLI status/session commands can display them. Also removes unused pendingStepConfirm property from respawn controller. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -54,6 +54,32 @@ export interface SessionState {
|
||||
createdAt: number;
|
||||
/** Timestamp of last activity */
|
||||
lastActivityAt: number;
|
||||
/** Session display name */
|
||||
name?: string;
|
||||
/** Session mode: 'claude' or 'shell' */
|
||||
mode?: 'claude' | 'shell';
|
||||
/** Auto-clear enabled */
|
||||
autoClearEnabled?: boolean;
|
||||
/** Auto-clear token threshold */
|
||||
autoClearThreshold?: number;
|
||||
/** Auto-compact enabled */
|
||||
autoCompactEnabled?: boolean;
|
||||
/** Auto-compact token threshold */
|
||||
autoCompactThreshold?: number;
|
||||
/** Auto-compact prompt */
|
||||
autoCompactPrompt?: string;
|
||||
/** Total cost in USD */
|
||||
totalCost?: number;
|
||||
/** Input tokens used */
|
||||
inputTokens?: number;
|
||||
/** Output tokens used */
|
||||
outputTokens?: number;
|
||||
/** Respawn controller config (if enabled) */
|
||||
respawnConfig?: RespawnConfig & { durationMinutes?: number };
|
||||
/** Ralph / Todo tracker enabled */
|
||||
ralphEnabled?: boolean;
|
||||
/** Ralph completion phrase (if set) */
|
||||
ralphCompletionPhrase?: string;
|
||||
}
|
||||
|
||||
// ========== Task Types ==========
|
||||
@@ -171,6 +197,10 @@ export interface RespawnConfig {
|
||||
sendInit: boolean;
|
||||
/** Optional prompt to send if /init doesn't trigger work */
|
||||
kickstartPrompt?: string;
|
||||
/** Time to wait after completion message before confirming idle (ms) */
|
||||
completionConfirmMs?: number;
|
||||
/** Fallback timeout when no output received at all (ms) */
|
||||
noOutputTimeoutMs?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user