Files
agy-pi/extensions
Matteo Benedetto 16fba66723 feat: persist Antigravity model list across restarts
The antigravity provider list lived only in a module-scoped variable
initialized from ANTG_PROVIDER_MODELS, so /agy:refresh-models updated the
running process but the list silently reset to the static defaults on
/reload or restart.

- add ~/.config/agy-pi/models-cache.json (mode 0600, atomic write) storing
  version, refreshedAt, project and the fetched model definitions
- load the cache at startup; fall back to ANTG_PROVIDER_MODELS when the file
  is missing, unreadable, corrupt or has an incompatible version
- persist the live catalog in /agy:refresh-models and report the file path
- add /agy:models-reset to drop the cache and restore the defaults

Verified: extension loads with no cache (11 defaults), a valid cache is
honored and registered, corrupt/invalid/version-mismatched caches fall back
silently, and /agy:models-reset deletes the cache and re-registers the
defaults end-to-end over RPC.
2026-09-13 18:53:10 +02:00
..