deleting index.ts files

This commit is contained in:
2026-02-04 21:02:01 -05:00
parent f0609e423e
commit 74b0a0dbab
92 changed files with 385 additions and 2082 deletions

View File

@@ -0,0 +1,87 @@
import {
BackgroundTaskPriority,
BackgroundTaskStatus,
} from "@/types/background-task";
export interface BackgroundTask {
readonly id: string;
readonly name: string;
readonly description: string;
readonly status: BackgroundTaskStatus;
readonly priority: BackgroundTaskPriority;
readonly createdAt: number;
readonly startedAt?: number;
readonly completedAt?: number;
readonly progress: TaskProgress;
readonly result?: TaskResult;
readonly error?: TaskError;
readonly metadata: TaskMetadata;
}
export interface TaskProgress {
readonly current: number;
readonly total: number;
readonly percentage: number;
readonly message: string;
readonly steps: ReadonlyArray<TaskStep>;
}
export interface TaskStep {
readonly name: string;
readonly status: BackgroundTaskStatus;
readonly startedAt?: number;
readonly completedAt?: number;
readonly output?: string;
}
export interface TaskResult {
readonly success: boolean;
readonly output: string;
readonly artifacts: ReadonlyArray<TaskArtifact>;
readonly summary: string;
}
export interface TaskArtifact {
readonly type: "file" | "diff" | "report" | "data";
readonly name: string;
readonly path?: string;
readonly content?: string;
}
export interface TaskError {
readonly code: string;
readonly message: string;
readonly stack?: string;
readonly recoverable: boolean;
}
export interface TaskMetadata {
readonly sessionId: string;
readonly agentId?: string;
readonly prompt?: string;
readonly tools: ReadonlyArray<string>;
readonly startedByUser: boolean;
}
export interface BackgroundTaskConfig {
readonly maxConcurrent: number;
readonly defaultTimeout: number;
readonly retryOnFailure: boolean;
readonly maxRetries: number;
readonly notifyOnComplete: boolean;
readonly persistTasks: boolean;
}
export interface TaskNotification {
readonly taskId: string;
readonly type: "started" | "progress" | "completed" | "failed";
readonly message: string;
readonly timestamp: number;
}
export interface BackgroundTaskStore {
readonly tasks: ReadonlyMap<string, BackgroundTask>;
readonly queue: ReadonlyArray<string>;
readonly running: ReadonlyArray<string>;
readonly completed: ReadonlyArray<string>;
}

120
src/interfaces/index.ts Normal file
View File

@@ -0,0 +1,120 @@
import { AgentType, IntentType, Provider } from "@/types/index";
export interface TuiInput {
sessionId?: string;
initialPrompt?: string;
provider?: string;
model?: string;
theme?: string;
workingDirectory?: string;
availableModels?: ProviderModel[];
cascadeEnabled?: boolean;
}
export interface TuiOutput {
exitCode: number;
sessionId?: string;
}
export interface Config {
provider: Provider;
model?: string;
theme?: string;
maxIterations: number;
timeout: number;
protectedPaths: string[];
systemPrompt?: string;
cascadeEnabled?: boolean;
}
export interface IntentRequest {
prompt: string;
context?: string;
files?: string[];
}
export interface IntentResponse {
intent: IntentType;
confidence: number;
reasoning: string;
needsClarification: boolean;
clarificationQuestions?: string[];
}
export interface PlanStep {
id: string;
type: "read" | "edit" | "create" | "delete" | "execute";
description: string;
file?: string;
dependencies?: string[];
tool?: string;
args?: Record<string, unknown>;
}
export interface ExecutionPlan {
steps: PlanStep[];
intent: IntentType;
summary: string;
estimatedTime?: number;
}
export interface ValidationResult {
valid: boolean;
errors: string[];
warnings: string[];
protectedPaths: string[];
}
export interface ChatMessage {
role: "user" | "assistant" | "system";
content: string;
timestamp: number;
}
export interface ChatSession {
id: string;
agent: AgentType;
messages: ChatMessage[];
contextFiles: string[];
createdAt: number;
updatedAt: number;
}
export interface CommandOptions {
agent?: AgentType;
model?: string;
files?: string[];
dryRun?: boolean;
maxIterations?: number;
autoApprove?: boolean;
task?: string;
prompt?: string;
context?: string;
intent?: IntentType;
output?: string;
planFile?: string;
action?: string;
key?: string;
value?: string;
}
export interface ToolResult {
success: boolean;
output?: string;
error?: string;
files?: string[];
}
export interface FileEdit {
file: string;
search: string;
replace: string;
description?: string;
}
export interface TerminalSpinner {
start(text: string): void;
succeed(text: string): void;
fail(text: string): void;
stop(): void;
}