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:
arkon
2026-03-01 04:01:58 +01:00
co-authored by Claude Opus 4.6
parent a27be18a5a
commit 8d2d51e8f0
16 changed files with 1472 additions and 1472 deletions
+59
View File
@@ -0,0 +1,59 @@
/**
* @fileoverview Agent Teams type definitions
*/
/** Team configuration from ~/.claude/teams/{name}/config.json */
export interface TeamConfig {
name: string;
leadSessionId: string;
members: TeamMember[];
}
/** A single team member (lead or teammate) */
export interface TeamMember {
agentId: string;
name: string;
agentType: 'team-lead' | 'general-purpose' | string;
color?: string;
backendType?: string;
prompt?: string;
tmuxPaneId?: string;
}
/** A task from ~/.claude/tasks/{team-name}/{N}.json */
export interface TeamTask {
id: string;
subject: string;
description?: string;
activeForm?: string;
status: 'pending' | 'in_progress' | 'completed' | string;
blocks: string[];
blockedBy: string[];
owner?: string;
metadata?: Record<string, unknown>;
}
/** An inbox message from ~/.claude/teams/{name}/inboxes/{member}.json */
export interface InboxMessage {
from: string;
text: string;
timestamp: string;
read?: boolean;
}
/**
* Information about a tmux pane within a session.
* Used for agent team teammate pane management.
*/
export interface PaneInfo {
/** Pane ID (e.g., "%0", "%1") — immutable within a tmux session */
paneId: string;
/** Pane index within the window (0, 1, 2...) */
paneIndex: number;
/** PID of the process running in the pane */
panePid: number;
/** Pane width in columns */
width: number;
/** Pane height in rows */
height: number;
}