import type { EnvValue, ExecutionProfileId, GitHubJobConfig, JobEnvironment, JobRequirements, NormalizedGitHubAttestConfig, NormalizedGitHubBridgeSyncConfig, NormalizedGitHubContractConfig, NormalizedGitHubDependencyBumpConfig, NormalizedGitHubEvidenceConfig, NormalizedGitHubHygieneConfig, NormalizedGitHubPagesSyncConfig, NormalizedGitHubSourceImpactConfig, NormalizedGitHubUpdateTrainConfig, NormalizedJob, NormalizedPipeline, PipelineEventEnvelope, PipelineWorkflowJobPlan, PipelineWorkflowLifecycleStepKind } from "../core/index.js"; export declare const GITHUB_WORKFLOW_PATH = ".github/workflows/async-pipeline.yml"; export declare const GITHUB_LOCK_PATH = ".locks/pipeline/github-workflow.lock.json"; export declare const LEGACY_GITHUB_LOCK_PATH = ".github/async-pipeline.lock.json"; export interface GitHubRenderOptions { cwd: string; configPath: string; workflowPath?: string; lockPath?: string; } export interface GitHubLock { version: number; generator: string; config: string; workflow: string; hash: string; generatedAt: string; actions: Array<{ id: string; uses: string; sha: string; label: string; ref: string; }>; triggers: Record; jobs: Array<{ id: string; target: string[]; trigger: string[]; env: Record; environment?: JobEnvironment; requires?: JobRequirements; execution?: ExecutionProfileId; github?: GitHubJobConfig; if?: string; }>; packageManager: string; packageManagerVersion?: string; buildCommand?: string; command: string; setup: string; nodeVersion: string; runtime: string[]; taskCache: boolean; dependencyCache: boolean; dependencyCachePath?: string; dependabotAutoMerge: { enabled: boolean; ecosystems: string[]; }; packagePreviews: { enabled: boolean; package?: string; target?: string; registry: string; namespace?: string; tokenEnv: string; comment: boolean; }; evidence: NormalizedGitHubEvidenceConfig; sourceImpact: NormalizedGitHubSourceImpactConfig & { generatedJobs: Array<{ job: string; planJob: string; matrixJob: string; matrixRows: number; sources: string[]; }>; }; attest: NormalizedGitHubAttestConfig; contract: NormalizedGitHubContractConfig; hygiene: NormalizedGitHubHygieneConfig; updateTrain: NormalizedGitHubUpdateTrainConfig; dependencyBump: NormalizedGitHubDependencyBumpConfig; bridge: NormalizedGitHubBridgeSyncConfig & { job: "async-bridge"; actionsJob: { enabled: boolean; scheduled: boolean; manual: boolean; }; }; pages: NormalizedGitHubPagesSyncConfig; manualDispatchJobs?: string[]; manualDispatchInputs?: ManualDispatchInput[]; } interface ManualDispatchInput { id: string; description: string; required: boolean; type: "string"; } export interface GitHubRenderResult { workflowPath: string; lockPath: string; workflow: string; lock: GitHubLock; } export interface GitHubEventContext { eventName: string; action?: string; ref?: string; baseRef?: string; headRef?: string; schedule?: string; selectedJob?: string; payload?: unknown; } export type GitHubLocalNetworkMode = "mock" | "deny" | "allow"; export interface GitHubManifestEvent { name: string; action?: string; ref?: string; sha?: string; actor?: string; schedule?: string; selectedJob?: string; pullRequest?: { number?: number; headRepo?: string; headSha?: string; baseRef?: string; }; } export interface GitHubManifestStep { id: string; name: string; uses?: string; label?: string; run?: string; if?: string; with?: Record; env?: Record; permissions?: Record; secrets: string[]; local: { contract: string; mode: "action" | "shell" | "mock"; network: GitHubLocalNetworkMode; networked: boolean; dangerous: boolean; mockReason?: string; fallbackReason?: string; }; } export interface GitHubJobManifest { version: 1; generatedBy: "@async/pipeline"; repo: string; workflow: string; lock: string; event: GitHubManifestEvent; job: { id: string; name: string; kind: "pipeline" | "generated"; target: string[]; runsOn: string | string[]; matrix?: Array<{ runner: string[]; index: number; }>; permissions: Record; environment: JobEnvironment | null; concurrency: string | null; if: string | null; trigger: string[]; }; steps: GitHubManifestStep[]; trust: { actionRefsPinned: boolean; workflow: string; lock: string; lifecycleFallbackReason: string | null; }; artifacts: Array<{ name: string; path: string; mode: "upload" | "download" | "local"; producerJob?: string; consumerJob?: string; retentionDays?: number; ifNoFilesFound?: string; }>; local: { workspace: string; stateDirectory: string; network: GitHubLocalNetworkMode; permissionsMode: "enforced"; mocks: string[]; }; } export interface GitHubPlanOptions extends GitHubRenderOptions { job?: string; repository?: string; eventName?: string; eventAction?: string; ref?: string; sha?: string; actor?: string; schedule?: string; selectedJob?: string; prNumber?: number; headRepo?: string; headSha?: string; baseRef?: string; sameRepository?: boolean; network?: GitHubLocalNetworkMode; } export interface GitHubPlanResult { version: 1; generatedBy: "@async/pipeline"; host: "github"; pipeline: string; workflow: string; lock: string; event: GitHubManifestEvent; eventEnvelope: PipelineEventEnvelope; lifecycle: PipelineWorkflowLifecycleStepKind[]; workflowJobs: PipelineWorkflowJobPlan[]; manifests: GitHubJobManifest[]; skippedJobs: Array<{ id: string; reason: string; trigger: string[]; }>; } export interface GitHubLocalStepReceipt { id: string; name: string; contract: string; status: "passed" | "failed" | "planned"; decision: "mocked" | "simulated" | "allowed" | "denied" | "planned"; issues: string[]; } export interface GitHubLocalRunReceipt { job: string; status: "passed" | "failed" | "planned"; dryRun: boolean; network: GitHubLocalNetworkMode; manifestPath?: string; stepReceipts: GitHubLocalStepReceipt[]; artifacts: GitHubJobManifest["artifacts"]; issues: string[]; } export interface GitHubLocalRunResult { status: "passed" | "failed" | "skipped" | "planned"; plan: GitHubPlanResult; planPath?: string; receipts: GitHubLocalRunReceipt[]; } export declare function renderGitHubWorkflow(pipeline: NormalizedPipeline, options: GitHubRenderOptions): Promise; export declare function writeGitHubWorkflow(result: GitHubRenderResult, cwd: string): Promise; export declare function checkGitHubWorkflow(result: GitHubRenderResult, cwd: string): Promise; export declare function readGitHubEventContext(env: NodeJS.ProcessEnv): Promise; export declare function jobsForGitHubEvent(pipeline: NormalizedPipeline, context: GitHubEventContext): NormalizedJob[]; export declare function planGitHubJobs(pipeline: NormalizedPipeline, options: GitHubPlanOptions): Promise; export declare function runGitHubLocalPlan(pipeline: NormalizedPipeline, options: GitHubPlanOptions & { env?: NodeJS.ProcessEnv; dryRun?: boolean; }): Promise; export declare function runGitHubLocalManifest(manifest: GitHubJobManifest, cwd: string, options?: { env?: NodeJS.ProcessEnv; dryRun?: boolean; }): Promise; export {}; //# sourceMappingURL=github.d.ts.map