mirror of
https://github.com/skilfoy/ARTEX-English.git
synced 2026-12-03 13:11:02 +00:00
The application tree is BaaRai/ARTEX v0.7.0 (22ae88af), imported as one commit because that history is not in this repository. This commit adds the cloud installer, a defender pack for the console and the known-bad image names, and a supply-chain check. The opt-in update banner points at this fork and stays off in the cloud compose file.
30 lines
901 B
Go
30 lines
901 B
Go
package server
|
|
|
|
import (
|
|
"log"
|
|
"net/http"
|
|
"strconv"
|
|
)
|
|
|
|
// skillGaps reports skills the agent asked for but the platform did not
|
|
// provide, aggregated by skill, agent, and task category. The source is the
|
|
// existing skill_usage miss rows, so the backlog is evidence-backed rather than
|
|
// inferred. Read-only: it creates no skill and changes no prompt.
|
|
func (s *Server) skillGaps(w http.ResponseWriter, r *http.Request) {
|
|
limit := 50
|
|
if raw := r.URL.Query().Get("limit"); raw != "" {
|
|
n, err := strconv.Atoi(raw)
|
|
if err != nil || n < 1 || n > 500 {
|
|
writeErr(w, 400, "limit must be an integer between 1 and 500")
|
|
return
|
|
}
|
|
limit = n
|
|
}
|
|
gaps, err := s.m.PG().SkillGaps(r.Context(), limit)
|
|
if err != nil {
|
|
log.Printf("[skills] gap query failed: %v", err)
|
|
writeErr(w, 500, "skill gap query failed")
|
|
return
|
|
}
|
|
writeJSON(w, 200, map[string]any{"gaps": gaps, "count": len(gaps)})
|
|
}
|