MCPcopy Create free account
hub / github.com/ByteYellow/AgentProvenance / graphExplain

Method graphExplain

internal/daemon/server.go:639–664  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

637}
638
639func (s Server) graphExplain(w http.ResponseWriter, r *http.Request) {
640 limit, err := intQuery(r, "limit", 100)
641 if err != nil {
642 writeResult(w, nil, err)
643 return
644 }
645 depth, err := intQuery(r, "depth", 2)
646 if err != nil {
647 writeResult(w, nil, err)
648 return
649 }
650 result, err := provenance.BuildExplain(s.DB, provenance.ExplainOptions{
651 RunID: r.URL.Query().Get("run"),
652 Artifact: r.URL.Query().Get("artifact"),
653 Attempt: r.URL.Query().Get("attempt"),
654 ToolCall: r.URL.Query().Get("tool_call"),
655 Process: r.URL.Query().Get("process"),
656 Event: r.URL.Query().Get("event"),
657 Risk: r.URL.Query().Get("risk"),
658 File: r.URL.Query().Get("file"),
659 Depth: depth,
660 Limit: limit,
661 Cursor: r.URL.Query().Get("cursor"),
662 })
663 writeResult(w, result, err)
664}
665
666func (s Server) graphLens(w http.ResponseWriter, r *http.Request) {
667 limit, err := intQuery(r, "limit", 500)

Callers

nothing calls this directly

Calls 3

BuildExplainFunction · 0.92
intQueryFunction · 0.85
writeResultFunction · 0.85

Tested by

no test coverage detected