diff --git a/src/types/delegation.ts b/src/types/delegation.ts index 25efaa79..257a2998 100644 --- a/src/types/delegation.ts +++ b/src/types/delegation.ts @@ -34,19 +34,8 @@ export interface DelegationSessionsRegistry { lastSessionId?: string; // Most recent session ID } -/** - * Execution result - */ -export interface ExecutionResult { - exitCode: number; - duration: number; // Seconds - workingDir: string; - sessionId: string; - profile: string; - model?: string; // Model name from settings - cost?: number; // Estimated cost (if available) - turns: number; -} +// Re-export ExecutionResult from canonical location for backward compatibility +export type { ExecutionResult } from '../delegation/executor/types'; /** * Real-time output event diff --git a/src/types/utils.ts b/src/types/utils.ts index d24651ac..a9320d53 100644 --- a/src/types/utils.ts +++ b/src/types/utils.ts @@ -42,6 +42,36 @@ export interface TerminalInfo { */ export type Result = { ok: true; value: T } | { ok: false; error: E }; +/** + * Generic operation result for success/failure patterns + * Use this instead of defining new *Result interfaces + */ +export interface OperationResult { + success: boolean; + message?: string; + error?: string; + data?: T; +} + +/** + * Generic component/tool status + * Used for CLI tools, services, etc. + */ +export interface ComponentStatus { + installed: boolean; + path?: string; + version?: string; +} + +/** + * Generic validation result + * Standardized on 'valid' property name + */ +export interface ValidationResult { + valid: boolean; + errors?: string[]; +} + // ============================================================================= // UI TYPES (Phase 1: CLI UI/UX Enhancement) // =============================================================================