import { z } from 'zod'; import { type JsonObject } from '../depot/shape.js'; import { type WorkflowContext } from './ci-detail.js'; /** Shapes specific to `ListWorkflows` and `GetWorkflow`, verified live 2026-09-06. */ export declare const workflowListEntrySchema: z.ZodObject<{ workflowId: z.ZodOptional; name: z.ZodOptional; workflowPath: z.ZodOptional; repo: z.ZodOptional; status: z.ZodOptional; trigger: z.ZodOptional; runId: z.ZodOptional; sha: z.ZodOptional; headSha: z.ZodOptional; pr: z.ZodOptional; createdAt: z.ZodOptional; jobCounts: z.ZodRecord; }, z.core.$strip>; export type WorkflowListEntry = z.infer; export declare function parseWorkflowListEntry(source: JsonObject): WorkflowListEntry; export declare const executionSchema: z.ZodObject<{ executionId: z.ZodOptional; execution: z.ZodOptional; status: z.ZodOptional; createdAt: z.ZodOptional; startedAt: z.ZodOptional; finishedAt: z.ZodOptional; durationSeconds: z.ZodOptional; }, z.core.$strip>; export declare const workflowAttemptSchema: z.ZodObject<{ attemptId: z.ZodOptional; attempt: z.ZodOptional; status: z.ZodOptional; conclusion: z.ZodOptional; sandboxId: z.ZodOptional; startedAt: z.ZodOptional; finishedAt: z.ZodOptional; durationSeconds: z.ZodOptional; }, z.core.$strip>; export declare const workflowJobSchema: z.ZodObject<{ jobId: z.ZodOptional; jobKey: z.ZodOptional; status: z.ZodOptional; conclusion: z.ZodOptional; startedAt: z.ZodOptional; finishedAt: z.ZodOptional; durationSeconds: z.ZodOptional; attempts: z.ZodArray; attempt: z.ZodOptional; status: z.ZodOptional; conclusion: z.ZodOptional; sandboxId: z.ZodOptional; startedAt: z.ZodOptional; finishedAt: z.ZodOptional; durationSeconds: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; export type Execution = z.infer; export type WorkflowJob = z.infer; export declare function parseExecution(source: JsonObject): Execution; /** * The execution Depot ran most recently: the highest execution number, or the last one listed * when numbers are missing or tied. Depot lists executions oldest first. */ export declare function latestExecution(executions: readonly T[]): T | undefined; /** * A workflow's timing as Depot reports it at the top level is its first execution's: after a * rerun the workflow-level `startedAt` still names the original start while `finishedAt` moves * to the latest finish, so their difference (seen live 2026-09-07: 23h58m for a workflow whose * rerun took under a minute) is not the time anything ran. When executions are present the * latest one carries the timing that is true now; without them the top-level fields are all * there is. */ export declare function currentWorkflowTiming(workflow: WorkflowContext, executions: readonly Execution[]): Pick; /** "execution 2 of 2", for the summary line; undefined when Depot listed no executions. */ export declare function describeExecutionPosition(executions: readonly Execution[]): string | undefined; export declare function parseWorkflowJob(source: JsonObject): WorkflowJob; //# sourceMappingURL=ci-workflow.d.ts.map