/** * cli:derive-action-specs — validate.ts */ import { DeriveActionSpecsInputSchema } from './types.js' import type { ValidationResult } from './types.js' export function validate(raw: unknown): ValidationResult { const parsed = DeriveActionSpecsInputSchema.safeParse(raw) if (!parsed.success) { return { valid: false, errors: parsed.error.issues.map((i) => `${i.path.join('.') || '(root)'}: ${i.message}`), warnings: [], } } return { valid: true, errors: [], warnings: [], spec: parsed.data } }