CLI: Embed checkup dictionary from API at build time
Summary
The CLI checkup command has a hardcoded list of check IDs and titles (CHECK_INFO). This needs to be updated to use the checkup dictionary from the API at build time, similar to how platform-ui handles this.
Problem
- The hardcoded
CHECK_INFOinlib/checkup.tsgets out of sync with the actual dictionary at https://postgres.ai/api/general/checkup_dictionary - When new checks are added to the API, the CLI doesn't reflect them
Solution
Implement build-time embedding following the platform-ui pattern:
- Create
scripts/embed-checkup-dictionary.ts- fetches from API at build time - Create
lib/checkup-dictionary.ts- types and helper functions - Generate
lib/checkup-dictionary-embedded.tsat build time (in .gitignore) - Update
lib/checkup.tsto use the embedded dictionary
Benefits
- No API calls at runtime
- Always up-to-date with the canonical dictionary
- Consistent with
platform-uiimplementation