import { z } from 'zod';

export const StatusSpecSchema = z.object({
  cwd: z.string().min(1),
  baseBranch: z.string().optional(),
});
export type StatusSpec = z.infer<typeof StatusSpecSchema>;

export interface AssemblyStatus {
  assemblyName: string;
  contextName: string;
  migrationsDir: string;
  provider: string | null;
  version: string;
  total: number;
  applied: number;
  pending: number;
  branchOnly: string[];
  snapshotDirty: boolean;
  error?: string;
}

export interface StatusResult {
  success: boolean;
  cwd: string;
  kind: 'generated' | 'studio' | 'unknown';
  currentBranch: string;
  baseBranch: string;
  assemblies: AssemblyStatus[];
  warnings: string[];
  error?: string;
}
