Walking ~40+ plugin TOMLs via the GitHub Contents API from the worker exceeded the Workers Free 50-subrequest-per-invocation limit, leaving the daemon's signed plugins index either empty or partial after every forced refresh. Move the walk into the repo: scripts/build-plugins-index.mjs reads each plugins/<name>/plugin.toml directly from the checked-out tree and emits a sorted flat array (name, version?, description?, needs?) at plugins-index.json. The CI workflow regenerates and commits this file on every push under plugins/, then pokes the worker's /api/registry/refresh — which now fetches the single committed plugins-index.json (1 subrequest), validates the JSON shape, and re-signs it with Ed25519. Refresh cost is now constant in registry size, not linear. The dashboard's dict-shaped /api/registry payload is unchanged — that still rebuilds via the daily 02:00 UTC cron.
Scripts
Utility scripts for maintaining the LibreFang registry.
validate.py
Validates all TOML content files across the registry.
python scripts/validate.py
What It Checks
Per content type:
- Providers -- required fields, valid tiers, non-negative costs, no duplicate model IDs
- Agents -- required fields (name, description, module), name matches directory
- Hands -- required fields (id, name, description), valid category, [agent] section, id matches directory
- Integrations -- required fields (id, name), [transport] section, id matches filename
- Skills -- [skill] section with name, [runtime] with valid type
- Plugins -- name matches directory, [hooks] section, hook files exist
Cross-type checks:
- Routing alias collisions between agents and hands (reported as warnings)
- Cross-file duplicate model IDs within the same provider
Requirements
- Python 3.11+ (uses
tomllib) - Or Python 3.8+ with
pip install tomli
Exit Codes
0-- all checks passed1-- one or more validation errors