import { IMPOSSIBLE, VersionInfo } from '@start9labs/start-sdk'

/**
 * v1.2.0:6 — AI "generate today's workout" (2026-06-19).
 *
 * A new AI flow alongside program generation: describe a single session in
 * plain words and get a ready-to-log workout back — exercises with suggested
 * weights + target reps + set counts grounded in recent history. Inline-edit
 * it, send a follow-up to refine it via the model, then "Use this workout" to
 * pre-fill the normal New Workout form (nothing persists until you save).
 *
 * Reuses the existing generation spine (detached runner / SSE / lenient JSON /
 * providers / history context) via a new AIGeneration.kind discriminant
 * ("program" | "workout"). Single-workout rows are ephemeral and excluded from
 * the program-shaped AI history.
 *
 * Additive schema change: the new AIGeneration.kind column (default "program")
 * is added by the boot-time guarded ALTER in docker_entrypoint.sh, so this
 * migration stays empty like every other column add. Existing rows read as
 * "program"; no data changes.
 */
export const v_1_2_0_6 = VersionInfo.of({
  version: '1.2.0:6',
  releaseNotes: {
    en_US:
      'New: AI "Today\'s workout". Describe a session in plain words and get a ready-to-log workout with suggested weights and reps from your history. Edit it, refine it with the AI, then pre-fill the workout log. No data changes.',
  },
  migrations: {
    up: async () => {},
    down: IMPOSSIBLE,
  },
})
