Prompt #159

Back to prompts
Extend Glug Addon Distribution API
Code Β· openai/gpt-4.1
5/5
Variables
addon_type
Tags
stack-aware,glug,addon,api,strict-separation,plugin-registry
Source
research-2026-05-01-stack-aware
Use count
0
Created
2026-05-01T18:30:48.776731+00:00
Updated
2026-05-01T18:30:48.776731+00:00

Content

Add support for a new addon type `{addon_type}` to the glug-server addon-distribution API.

Existing API: /api/v1/glug/addons/* (registered in glug webserver, plugin_registry blueprint)
Client polling: yoga and other clients call GET /api/v1/glug/clients/{client_id}/addons periodically

Changes needed:
1. In glug plugin that owns addon-distribution: add {addon_type} to VALID_ADDON_TYPES
2. New endpoint: GET /api/v1/glug/addons/{addon_type}/{addon_id}
   Response: {{"id": "...", "type": "{addon_type}", "version": "...", "download_url": "...", "checksum": "..."}}
3. DB migration: ALTER TABLE glug_addon_releases ADD COLUMN addon_type TEXT DEFAULT 'standard'
4. Update client polling schema in any helpers/rag_stack_client.py or yoga helper
5. Smoke test: `curl http://localhost:8800/api/v1/glug/addons/{addon_type}` returns valid JSON

Per strict-separation rule: addon data stays in /persistent/glug/glug.db, not rag.db.