(w http.ResponseWriter, r *http.Request)
| 637 | } |
| 638 | |
| 639 | func (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 | |
| 666 | func (s Server) graphLens(w http.ResponseWriter, r *http.Request) { |
| 667 | limit, err := intQuery(r, "limit", 500) |
nothing calls this directly
no test coverage detected