import { z } from 'zod'; import { CriterionSchema } from './criterion.js'; /** * Status de uma task */ export declare const TaskStatusSchema: z.ZodEnum<["pending", "in_progress", "completed", "failed", "skipped"]>; export type TaskStatus = z.infer; /** * Tipo de ação técnica */ export declare const ActionTypeSchema: z.ZodEnum<["create", "read", "update", "delete", "refactor", "migrate", "test", "configure", "fix", "integrate"]>; export type ActionType = z.infer; /** * Definição de uma task Ralph */ export declare const TaskSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; description: z.ZodOptional; order: z.ZodNumber; actionType: z.ZodOptional>; dependencies: z.ZodDefault>; maxIterations: z.ZodDefault; timeout: z.ZodOptional; criteria: z.ZodArray; command: z.ZodString; expectedExitCode: z.ZodDefault; expectedOutput: z.ZodOptional; timeout: z.ZodOptional; }, "strip", z.ZodTypeAny, { command: string; type: "command"; expectedExitCode: number; expectedOutput?: string | undefined; timeout?: number | undefined; }, { command: string; type: "command"; expectedExitCode?: number | undefined; expectedOutput?: string | undefined; timeout?: number | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"file">; path: z.ZodString; shouldExist: z.ZodDefault; }, "strip", z.ZodTypeAny, { path: string; type: "file"; shouldExist: boolean; }, { path: string; type: "file"; shouldExist?: boolean | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"content">; path: z.ZodString; pattern: z.ZodString; shouldMatch: z.ZodDefault; }, "strip", z.ZodTypeAny, { path: string; type: "content"; pattern: string; shouldMatch: boolean; }, { path: string; type: "content"; pattern: string; shouldMatch?: boolean | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"endpoint">; url: z.ZodString; method: z.ZodDefault>; expectedStatus: z.ZodNumber; timeout: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "endpoint"; url: string; method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH"; expectedStatus: number; timeout?: number | undefined; }, { type: "endpoint"; url: string; expectedStatus: number; timeout?: number | undefined; method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined; }>, z.ZodObject<{ type: z.ZodLiteral<"coverage">; metric: z.ZodEnum<["lines", "functions", "branches", "statements"]>; minPercentage: z.ZodNumber; }, "strip", z.ZodTypeAny, { type: "coverage"; metric: "lines" | "functions" | "branches" | "statements"; minPercentage: number; }, { type: "coverage"; metric: "lines" | "functions" | "branches" | "statements"; minPercentage: number; }>, z.ZodObject<{ type: z.ZodLiteral<"build">; command: z.ZodString; allowWarnings: z.ZodDefault; }, "strip", z.ZodTypeAny, { command: string; type: "build"; allowWarnings: boolean; }, { command: string; type: "build"; allowWarnings?: boolean | undefined; }>]>; required: z.ZodDefault; }, "strip", z.ZodTypeAny, { id: string; description: string; verification: { command: string; type: "command"; expectedExitCode: number; expectedOutput?: string | undefined; timeout?: number | undefined; } | { path: string; type: "file"; shouldExist: boolean; } | { path: string; type: "content"; pattern: string; shouldMatch: boolean; } | { type: "endpoint"; url: string; method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH"; expectedStatus: number; timeout?: number | undefined; } | { type: "coverage"; metric: "lines" | "functions" | "branches" | "statements"; minPercentage: number; } | { command: string; type: "build"; allowWarnings: boolean; }; required: boolean; }, { id: string; description: string; verification: { command: string; type: "command"; expectedExitCode?: number | undefined; expectedOutput?: string | undefined; timeout?: number | undefined; } | { path: string; type: "file"; shouldExist?: boolean | undefined; } | { path: string; type: "content"; pattern: string; shouldMatch?: boolean | undefined; } | { type: "endpoint"; url: string; expectedStatus: number; timeout?: number | undefined; method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined; } | { type: "coverage"; metric: "lines" | "functions" | "branches" | "statements"; minPercentage: number; } | { command: string; type: "build"; allowWarnings?: boolean | undefined; }; required?: boolean | undefined; }>, "many">; commitMessage: z.ZodOptional; prompt: z.ZodOptional; }, "strip", z.ZodTypeAny, { id: string; name: string; order: number; dependencies: string[]; maxIterations: number; criteria: { id: string; description: string; verification: { command: string; type: "command"; expectedExitCode: number; expectedOutput?: string | undefined; timeout?: number | undefined; } | { path: string; type: "file"; shouldExist: boolean; } | { path: string; type: "content"; pattern: string; shouldMatch: boolean; } | { type: "endpoint"; url: string; method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH"; expectedStatus: number; timeout?: number | undefined; } | { type: "coverage"; metric: "lines" | "functions" | "branches" | "statements"; minPercentage: number; } | { command: string; type: "build"; allowWarnings: boolean; }; required: boolean; }[]; timeout?: number | undefined; description?: string | undefined; actionType?: "create" | "read" | "update" | "delete" | "refactor" | "migrate" | "test" | "configure" | "fix" | "integrate" | undefined; commitMessage?: string | undefined; prompt?: string | undefined; }, { id: string; name: string; order: number; criteria: { id: string; description: string; verification: { command: string; type: "command"; expectedExitCode?: number | undefined; expectedOutput?: string | undefined; timeout?: number | undefined; } | { path: string; type: "file"; shouldExist?: boolean | undefined; } | { path: string; type: "content"; pattern: string; shouldMatch?: boolean | undefined; } | { type: "endpoint"; url: string; expectedStatus: number; timeout?: number | undefined; method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined; } | { type: "coverage"; metric: "lines" | "functions" | "branches" | "statements"; minPercentage: number; } | { command: string; type: "build"; allowWarnings?: boolean | undefined; }; required?: boolean | undefined; }[]; timeout?: number | undefined; description?: string | undefined; actionType?: "create" | "read" | "update" | "delete" | "refactor" | "migrate" | "test" | "configure" | "fix" | "integrate" | undefined; dependencies?: string[] | undefined; maxIterations?: number | undefined; commitMessage?: string | undefined; prompt?: string | undefined; }>; export type Task = z.infer; /** * Resultado de execução de uma task */ export declare const TaskResultSchema: z.ZodObject<{ taskId: z.ZodString; status: z.ZodEnum<["pending", "in_progress", "completed", "failed", "skipped"]>; iterationsUsed: z.ZodNumber; startedAt: z.ZodString; completedAt: z.ZodOptional; commitSha: z.ZodOptional; errorMessage: z.ZodOptional; criteriaResults: z.ZodOptional; }, "strip", z.ZodTypeAny, { criterionId: string; passed: boolean; message?: string | undefined; }, { criterionId: string; passed: boolean; message?: string | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { status: "pending" | "in_progress" | "completed" | "failed" | "skipped"; taskId: string; iterationsUsed: number; startedAt: string; completedAt?: string | undefined; commitSha?: string | undefined; errorMessage?: string | undefined; criteriaResults?: { criterionId: string; passed: boolean; message?: string | undefined; }[] | undefined; }, { status: "pending" | "in_progress" | "completed" | "failed" | "skipped"; taskId: string; iterationsUsed: number; startedAt: string; completedAt?: string | undefined; commitSha?: string | undefined; errorMessage?: string | undefined; criteriaResults?: { criterionId: string; passed: boolean; message?: string | undefined; }[] | undefined; }>; export type TaskResult = z.infer; /** * Contexto de execução de uma task */ export interface TaskExecutionContext { taskId: string; prompt: string; maxIterations: number; timeout?: number; criteria: z.infer[]; workingDirectory: string; environment?: Record; } /** * Evento de progresso de task */ export interface TaskProgressEvent { taskId: string; iteration: number; maxIterations: number; lastOutput?: string; criteriaStatus?: Array<{ criterionId: string; checked: boolean; passed?: boolean; }>; } /** * Opções de decomposição de tasks */ export interface DecomposeOptions { heuristic?: 'crud' | 'refactor' | 'migration' | 'auto'; maxTasksPerFeature?: number; defaultMaxIterations?: number; includeTests?: boolean; } /** * Resultado da decomposição */ export interface DecomposeResult { success: boolean; tasks: Task[]; errors?: string[]; warnings?: string[]; } //# sourceMappingURL=task.d.ts.map