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

// Daily activity digest — Phase B. Code-only, no schema change (uses the existing
// email_* tables + app_settings; migrations are no-ops):
//   * backend/digest_builder.py: build_digest() composes two sections — by team
//     member (per-user narrative from the LOCAL Spark model, never Claude) and by
//     investor (team-wide, inbound + outbound, deduped). Soft-delete filtered.
//   * backend/email_integration/digest_scheduler.py: an always-on daily thread
//     that re-reads a DB-backed policy each cycle and sends once/day to all active
//     admins. Window cursor lives in app_settings (a missed day rolls forward).
//   * Control moved into the admin panel: app_settings.digest_policy + GET/PATCH
//     /api/admin/digest/policy + a Settings enable toggle and send-time dropdown
//     (CRM_DIGEST_ENABLED/SEND_HOUR only seed the first-boot default).
//   * POST /api/admin/digest/send-now + a "Send Digest Now" button send the real
//     last-24h digest on demand without touching the daily cursor.
export const v_0_1_0_77 = VersionInfo.of({
  version: '0.1.0:77',
  releaseNotes: {
    en_US: [
      'New daily activity digest: a once-a-day email to all admins summarizing each team member’s email',
      'activity per investor, plus a by-investor view (inbound and outbound). Summaries are generated',
      'locally (Spark), never sent to Claude. Enable it and set the send time in Settings → Admin.',
    ].join(' '),
  },
  migrations: { up: async () => {}, down: async () => {} },
})
