feat: dashboard real-time con aggiornamento incrementale
- Buffer locale samples[] per aggiornamenti real-time - Poll /api/status ogni 10 secondi - Aggiunge nuovi campioni senza ricaricare history - Aggiunge AGENTS.md per istruzioni agenti OpenCode - Aggiunge team agenti in .opencode/agents/
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
---
|
||||
name: supabase-pinger-dev
|
||||
description: "Supabase Pinger — manage Supabase keep-alive service"
|
||||
allowed-tools:
|
||||
- Read
|
||||
- Write
|
||||
- Edit
|
||||
- Bash
|
||||
- Glob
|
||||
- Grep
|
||||
---
|
||||
|
||||
<objective>
|
||||
Development skill for supabase-pinger project. Provides project-specific commands and context.
|
||||
</objective>
|
||||
|
||||
<project_structure>
|
||||
supabase-pinger/
|
||||
├── app.py # FastAPI app + ping logic
|
||||
├── tests/
|
||||
│ ├── conftest.py # Test config
|
||||
│ └── test_api.py # API tests
|
||||
├── AGENTS.md # Agent instructions
|
||||
├── requirements.txt # Python deps
|
||||
├── Dockerfile
|
||||
└── docker-compose.yml
|
||||
</project_structure>
|
||||
|
||||
<commands>
|
||||
# Run server (requires valid .env)
|
||||
python app.py
|
||||
|
||||
# Run tests
|
||||
pytest -q
|
||||
|
||||
# Docker build
|
||||
docker build -t supabase-pinger .
|
||||
|
||||
# Docker run
|
||||
docker run -d --env-file .env -p 8080:8080 --restart unless-stopped supabase-pinger
|
||||
</commands>
|
||||
|
||||
<api_endpoints>
|
||||
- GET / # Dashboard (SmokePing-style)
|
||||
- GET /api/status # Latest sample
|
||||
- GET /api/history # History (hours param)
|
||||
- GET /docs # Swagger UI
|
||||
- GET /openapi.json # OpenAPI schema
|
||||
</api_endpoints>
|
||||
|
||||
<key_components>
|
||||
- create_app() # Main factory
|
||||
- Settings # Config dataclass
|
||||
- RRDStore # Circular buffer storage
|
||||
- run_ping() # Execute keep-alive
|
||||
- collector_loop() # Daemon thread
|
||||
</key_components>
|
||||
|
||||
<env_vars>
|
||||
- SUPABASE_DB_HOST
|
||||
- SUPABASE_DB_PORT
|
||||
- SUPABASE_DB_NAME
|
||||
- SUPABASE_DB_USER
|
||||
- SUPABASE_DB_PASSWORD
|
||||
- PING_INTERVAL_MINUTES
|
||||
- PING_QUERY
|
||||
- WEB_HOST
|
||||
- WEB_PORT
|
||||
</env_vars>
|
||||
|
||||
<when_to_use>
|
||||
- Any work on supabase-pinger project
|
||||
- Development, testing, or deployment
|
||||
</when_to_use>
|
||||
Reference in New Issue
Block a user