import { type CandidateContext, type ExecutionSourceRecord, type JobId, type NormalizedPipeline, type NormalizedSource, type ShellCommand, type SourceId, type TaskSourceContext } from "../core/index.js"; import { type FileHashCache, type PipelineStore } from "./store.js"; export interface ResolvedSource { id: SourceId; definition: NormalizedSource; dir: string; pipelinePath: string; record: ExecutionSourceRecord; pipeline?: NormalizedPipeline; } export interface SourceResolveOptions { /** Fetch refs and force-checkout the declared ref, discarding local edits in the checkout. */ sync?: boolean; /** Clone missing checkouts and resolve the declared ref, but reuse existing checkouts without fetching. */ ensure?: boolean; loadPipelines?: boolean; requirePrepareWritable?: boolean; } export interface PipelineRunPlan { rootPipeline: NormalizedPipeline; pipeline: NormalizedPipeline; candidate: CandidateContext; sources: Record; } export interface MatrixRow { task: string; source: string; taskId: string; type: "git" | "path"; url?: string; path?: string; ref?: string; } export interface SourceImpactPlanSource { id: SourceId; type: "git" | "path"; path: string; pipeline: string; url?: string; ref?: string; writable?: boolean; prepare: string[]; prepareSkippedReason?: string; } export interface SourceImpactMatrixRow extends MatrixRow { path: string; } export interface SourceImpactPlan { version: 1; generatedBy: "@async/pipeline"; job: JobId; sources: Record; matrix: { include: SourceImpactMatrixRow[]; }; } export declare function createRunPlan(rootPipeline: NormalizedPipeline, cwd: string, store: PipelineStore, fileHashCache?: FileHashCache): Promise; export declare function resolveSources(pipeline: NormalizedPipeline, cwd: string, store: PipelineStore, options?: SourceResolveOptions): Promise>; export declare function readPipelineMetadata(configPath: string, options?: { includeSources?: boolean; cwd?: string; store?: PipelineStore; }): Promise; export declare function matrixForJob(pipeline: NormalizedPipeline, jobId: string): { include: MatrixRow[]; }; export declare function sourceImpactPlanForJob(pipeline: NormalizedPipeline, cwd: string, jobId: JobId): SourceImpactPlan; export declare function sourceContext(source: ResolvedSource): TaskSourceContext; export declare function sourceCheckoutDir(store: PipelineStore, sourceDefinition: NormalizedSource): string; export declare function shellCommandsFromSteps(steps: readonly ShellCommand[]): string[]; //# sourceMappingURL=sources.d.ts.map