mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-10-30 16:47:01 +09:00
backend/app/data/registry_index.json is a mirror of serverkit-extensions' index.json, and nothing automated the mirror -- so every registry publish left the panel's offline fallback stale until CI complained. That is how `serverkit-localkit` sat missing from it: an offline panel offered a different extension set than an online one. Same shape as scripts/sync-agent-installers.sh: prefer a sibling checkout so it works offline and before the registry PR is merged, else the published branch, resolving the default branch from the API rather than hardcoding a name. Two things it is deliberately careful about: - It vendors the RAW index, never https://serverkit.ai/ext/index.json. The panel fetches through that proxy at runtime and the proxy rewrites every relative `logo` path to an absolute serverkit.ai URL, while the bundled loader resolves relative paths itself. Vendoring the proxied copy would bake in the wrong paths, and the tuple the tests compare (version/source/sha256) is identical either way -- nothing would have caught it. - It keeps the local `note` (which does not exist upstream) and writes with indent=2/ensure_ascii=True/trailing newline, which round-trips the existing file byte-for-byte. An in-sync run is a true no-op, not a reformat. It refuses to write an index with no entries, so a broken or truncated canonical source cannot blank the Marketplace fallback. Verified: no-op when in sync; reproducing the real bug (dropping the localkit entry) and re-running restores the file byte-identical to HEAD; repins are reported; the empty-canonical guard exits non-zero leaving the file untouched. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>