mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-05 23:19:43 +02:00
refactor: split types.ts into domain modules (phase 4, step 1)
Split 1,443-line types.ts into 14 focused domain files under src/types/: common.ts, session.ts, task.ts, app-state.ts, respawn.ts, ralph.ts, api.ts, lifecycle.ts, run-summary.ts, tools.ts, teams.ts, push.ts, plan.ts, and index.ts barrel. Moved PlanItem interface from plan-orchestrator.ts into types/plan.ts to break circular dependency. Original types.ts replaced with barrel re-export — zero changes to 36 import sites. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* @fileoverview Session lifecycle audit types
|
||||
*/
|
||||
|
||||
/** Types of session lifecycle events recorded to the audit log */
|
||||
export type LifecycleEventType =
|
||||
| 'created' // Session object created
|
||||
| 'started' // PTY process launched (interactive/shell/prompt)
|
||||
| 'exit' // PTY process exited (with exit code)
|
||||
| 'deleted' // cleanupSession() called — session removed
|
||||
| 'detached' // Server shutdown — PTY left alive in tmux for recovery
|
||||
| 'recovered' // Session restored from tmux on server restart
|
||||
| 'stale_cleaned' // Removed from state.json by cleanupStaleSessions()
|
||||
| 'mux_died' // tmux session died (detected by reconciliation)
|
||||
| 'server_started' // Server started (marker for restart detection)
|
||||
| 'server_stopped'; // Server shutting down
|
||||
|
||||
/** A single entry in the session lifecycle audit log */
|
||||
export interface LifecycleEntry {
|
||||
ts: number;
|
||||
event: LifecycleEventType;
|
||||
sessionId: string;
|
||||
name?: string;
|
||||
mode?: string;
|
||||
reason?: string;
|
||||
exitCode?: number | null;
|
||||
extra?: Record<string, unknown>;
|
||||
}
|
||||
Reference in New Issue
Block a user