import { z } from 'zod'; import { TaskResultSchema } from './task.js'; /** * Status do pipeline */ export declare const PipelineStatusSchema: z.ZodEnum<["pending", "running", "paused", "completed", "failed", "aborted"]>; export type PipelineStatus = z.infer; /** * Configuração de execução do pipeline */ export declare const PipelineConfigSchema: z.ZodObject<{ defaultMaxIterations: z.ZodDefault; globalTimeoutMinutes: z.ZodDefault; failFast: z.ZodDefault; autoCommit: z.ZodDefault; commitPrefix: z.ZodDefault; dryRun: z.ZodDefault; interactive: z.ZodDefault; }, "strip", z.ZodTypeAny, { defaultMaxIterations: number; globalTimeoutMinutes: number; failFast: boolean; autoCommit: boolean; commitPrefix: string; dryRun: boolean; interactive: boolean; }, { defaultMaxIterations?: number | undefined; globalTimeoutMinutes?: number | undefined; failFast?: boolean | undefined; autoCommit?: boolean | undefined; commitPrefix?: string | undefined; dryRun?: boolean | undefined; interactive?: boolean | undefined; }>; export type PipelineConfig = z.infer; /** * Validação final do pipeline */ export declare const FinalValidationSchema: z.ZodObject<{ command: z.ZodString; expectedOutput: z.ZodOptional; expectedExitCode: z.ZodDefault; }, "strip", z.ZodTypeAny, { command: string; expectedExitCode: number; expectedOutput?: string | undefined; }, { command: string; expectedExitCode?: number | undefined; expectedOutput?: string | undefined; }>; export type FinalValidation = z.infer; /** * Plano de execução completo */ export declare const ExecutionPlanSchema: z.ZodObject<{ pipelineId: z.ZodString; featureId: z.ZodString; featureName: z.ZodString; createdAt: z.ZodString; config: z.ZodObject<{ defaultMaxIterations: z.ZodDefault; globalTimeoutMinutes: z.ZodDefault; failFast: z.ZodDefault; autoCommit: z.ZodDefault; commitPrefix: z.ZodDefault; dryRun: z.ZodDefault; interactive: z.ZodDefault; }, "strip", z.ZodTypeAny, { defaultMaxIterations: number; globalTimeoutMinutes: number; failFast: boolean; autoCommit: boolean; commitPrefix: string; dryRun: boolean; interactive: boolean; }, { defaultMaxIterations?: number | undefined; globalTimeoutMinutes?: number | undefined; failFast?: boolean | undefined; autoCommit?: boolean | undefined; commitPrefix?: string | undefined; dryRun?: boolean | undefined; interactive?: boolean | undefined; }>; tasks: z.ZodArray; 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; }>, "many">; finalValidation: z.ZodOptional; expectedExitCode: z.ZodDefault; }, "strip", z.ZodTypeAny, { command: string; expectedExitCode: number; expectedOutput?: string | undefined; }, { command: string; expectedExitCode?: number | undefined; expectedOutput?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { createdAt: string; featureId: string; featureName: string; pipelineId: string; config: { defaultMaxIterations: number; globalTimeoutMinutes: number; failFast: boolean; autoCommit: boolean; commitPrefix: string; dryRun: boolean; interactive: boolean; }; tasks: { 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; }[]; finalValidation?: { command: string; expectedExitCode: number; expectedOutput?: string | undefined; } | undefined; }, { createdAt: string; featureId: string; featureName: string; pipelineId: string; config: { defaultMaxIterations?: number | undefined; globalTimeoutMinutes?: number | undefined; failFast?: boolean | undefined; autoCommit?: boolean | undefined; commitPrefix?: string | undefined; dryRun?: boolean | undefined; interactive?: boolean | undefined; }; tasks: { 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; }[]; finalValidation?: { command: string; expectedExitCode?: number | undefined; expectedOutput?: string | undefined; } | undefined; }>; export type ExecutionPlan = z.infer; /** * Evento do histórico do pipeline */ export declare const PipelineEventSchema: z.ZodObject<{ timestamp: z.ZodString; type: z.ZodEnum<["pipeline_started", "pipeline_completed", "pipeline_failed", "pipeline_paused", "pipeline_resumed", "pipeline_aborted", "task_started", "task_completed", "task_failed", "task_skipped", "iteration_completed", "commit_created"]>; taskId: z.ZodOptional; details: z.ZodOptional>; }, "strip", z.ZodTypeAny, { type: "pipeline_started" | "pipeline_completed" | "pipeline_failed" | "pipeline_paused" | "pipeline_resumed" | "pipeline_aborted" | "task_started" | "task_completed" | "task_failed" | "task_skipped" | "iteration_completed" | "commit_created"; timestamp: string; taskId?: string | undefined; details?: Record | undefined; }, { type: "pipeline_started" | "pipeline_completed" | "pipeline_failed" | "pipeline_paused" | "pipeline_resumed" | "pipeline_aborted" | "task_started" | "task_completed" | "task_failed" | "task_skipped" | "iteration_completed" | "commit_created"; timestamp: string; taskId?: string | undefined; details?: Record | undefined; }>; export type PipelineEvent = z.infer; /** * Estado persistido do pipeline */ export declare const PipelineStateSchema: z.ZodObject<{ pipelineId: z.ZodString; featureId: z.ZodString; status: z.ZodEnum<["pending", "running", "paused", "completed", "failed", "aborted"]>; startedAt: z.ZodOptional; completedAt: z.ZodOptional; currentTaskId: z.ZodOptional; tasksCompleted: z.ZodArray; 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; }>, "many">; tasksPending: z.ZodArray; tasksFailed: z.ZodArray; history: z.ZodArray; taskId: z.ZodOptional; details: z.ZodOptional>; }, "strip", z.ZodTypeAny, { type: "pipeline_started" | "pipeline_completed" | "pipeline_failed" | "pipeline_paused" | "pipeline_resumed" | "pipeline_aborted" | "task_started" | "task_completed" | "task_failed" | "task_skipped" | "iteration_completed" | "commit_created"; timestamp: string; taskId?: string | undefined; details?: Record | undefined; }, { type: "pipeline_started" | "pipeline_completed" | "pipeline_failed" | "pipeline_paused" | "pipeline_resumed" | "pipeline_aborted" | "task_started" | "task_completed" | "task_failed" | "task_skipped" | "iteration_completed" | "commit_created"; timestamp: string; taskId?: string | undefined; details?: Record | undefined; }>, "many">; commits: z.ZodArray, "many">; metrics: z.ZodOptional>; }, "strip", z.ZodTypeAny, { status: "aborted" | "pending" | "completed" | "failed" | "running" | "paused"; featureId: string; pipelineId: string; tasksCompleted: { 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; }[]; tasksPending: string[]; tasksFailed: string[]; history: { type: "pipeline_started" | "pipeline_completed" | "pipeline_failed" | "pipeline_paused" | "pipeline_resumed" | "pipeline_aborted" | "task_started" | "task_completed" | "task_failed" | "task_skipped" | "iteration_completed" | "commit_created"; timestamp: string; taskId?: string | undefined; details?: Record | undefined; }[]; commits: { message: string; taskId: string; timestamp: string; sha: string; }[]; startedAt?: string | undefined; completedAt?: string | undefined; currentTaskId?: string | undefined; metrics?: { totalIterations: number; totalDurationSeconds: number; } | undefined; }, { status: "aborted" | "pending" | "completed" | "failed" | "running" | "paused"; featureId: string; pipelineId: string; tasksCompleted: { 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; }[]; tasksPending: string[]; tasksFailed: string[]; history: { type: "pipeline_started" | "pipeline_completed" | "pipeline_failed" | "pipeline_paused" | "pipeline_resumed" | "pipeline_aborted" | "task_started" | "task_completed" | "task_failed" | "task_skipped" | "iteration_completed" | "commit_created"; timestamp: string; taskId?: string | undefined; details?: Record | undefined; }[]; commits: { message: string; taskId: string; timestamp: string; sha: string; }[]; startedAt?: string | undefined; completedAt?: string | undefined; currentTaskId?: string | undefined; metrics?: { totalIterations: number; totalDurationSeconds: number; } | undefined; }>; export type PipelineState = z.infer; /** * Resultado da execução do pipeline */ export interface PipelineResult { pipelineId: string; status: PipelineStatus; tasksCompleted: number; tasksFailed: number; totalIterations: number; durationSeconds: number; commits: string[]; finalValidationPassed?: boolean; errorMessage?: string; } /** * Progresso do pipeline */ export interface PipelineProgress { pipelineId: string; status: PipelineStatus; totalTasks: number; completedTasks: number; currentTask?: { id: string; name: string; iteration: number; maxIterations: number; }; estimatedProgress: number; } /** * Callbacks do pipeline */ export interface PipelineCallbacks { onStart?: (pipelineId: string) => void; onTaskStart?: (taskId: string, taskName: string) => void; onTaskProgress?: (taskId: string, iteration: number, output?: string) => void; onTaskComplete?: (taskId: string, result: z.infer) => void; onTaskFail?: (taskId: string, error: string) => void; onCommit?: (taskId: string, sha: string) => void; onComplete?: (result: PipelineResult) => void; onFail?: (error: string) => void; onPause?: () => void; onResume?: () => void; } //# sourceMappingURL=pipeline.d.ts.map