graphsight 0.2.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {graphsight-0.2.0 → graphsight-0.3.0}/LICENSE +21 -21
- {graphsight-0.2.0 → graphsight-0.3.0}/MANIFEST.in +2 -2
- {graphsight-0.2.0/graphsight.egg-info → graphsight-0.3.0}/PKG-INFO +1 -1
- {graphsight-0.2.0 → graphsight-0.3.0}/README.md +152 -152
- {graphsight-0.2.0 → graphsight-0.3.0}/graphsight/__init__.py +11 -11
- {graphsight-0.2.0 → graphsight-0.3.0}/graphsight/cli.py +66 -66
- graphsight-0.2.0/graphsight/dist/assets/arc-DX2Y_03-.js → graphsight-0.3.0/graphsight/dist/assets/arc-Bsma0Xbp.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/architectureDiagram-3BPJPVTR-CoN3YUIu.js → graphsight-0.3.0/graphsight/dist/assets/architectureDiagram-3BPJPVTR-4Qdi8s0q.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/blockDiagram-GPEHLZMM-z6CbyinI.js → graphsight-0.3.0/graphsight/dist/assets/blockDiagram-GPEHLZMM-Dp7Miq3n.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/c4Diagram-AAUBKEIU-BS1vxNfO.js → graphsight-0.3.0/graphsight/dist/assets/c4Diagram-AAUBKEIU-D1G27yOy.js +1 -1
- graphsight-0.3.0/graphsight/dist/assets/channel-B61HT7Gu.js +1 -0
- graphsight-0.2.0/graphsight/dist/assets/chunk-2J33WTMH-Kx9yrCNJ.js → graphsight-0.3.0/graphsight/dist/assets/chunk-2J33WTMH-DpBo35Ip.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/chunk-4BX2VUAB-ChQj2n3P.js → graphsight-0.3.0/graphsight/dist/assets/chunk-4BX2VUAB-DEs5iyI1.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/chunk-55IACEB6-CzqSW9P2.js → graphsight-0.3.0/graphsight/dist/assets/chunk-55IACEB6-Bku3rt2s.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/chunk-727SXJPM-Ci9pVnPE.js → graphsight-0.3.0/graphsight/dist/assets/chunk-727SXJPM-DzVVvz6q.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/chunk-AQP2D5EJ-DHxxpVwV.js → graphsight-0.3.0/graphsight/dist/assets/chunk-AQP2D5EJ-CuvszdZE.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/chunk-FMBD7UC4-Bpcavdl6.js → graphsight-0.3.0/graphsight/dist/assets/chunk-FMBD7UC4-BHq1ED1I.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/chunk-ND2GUHAM-p3aZOIrR.js → graphsight-0.3.0/graphsight/dist/assets/chunk-ND2GUHAM-QDS6cCnX.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/chunk-QZHKN3VN-CosEeF5i.js → graphsight-0.3.0/graphsight/dist/assets/chunk-QZHKN3VN-BpvSoQs2.js +1 -1
- graphsight-0.3.0/graphsight/dist/assets/classDiagram-4FO5ZUOK-9u34qdAk.js +1 -0
- graphsight-0.3.0/graphsight/dist/assets/classDiagram-v2-Q7XG4LA2-9u34qdAk.js +1 -0
- graphsight-0.2.0/graphsight/dist/assets/cose-bilkent-S5V4N54A-BssgBP7_.js → graphsight-0.3.0/graphsight/dist/assets/cose-bilkent-S5V4N54A-CeiajIUk.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/dagre-BM42HDAG-BwS39MAa.js → graphsight-0.3.0/graphsight/dist/assets/dagre-BM42HDAG-C83dZHfH.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/diagram-2AECGRRQ-B7CPRZV4.js → graphsight-0.3.0/graphsight/dist/assets/diagram-2AECGRRQ-Ch3rS7R6.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/diagram-5GNKFQAL-BIuCqvh0.js → graphsight-0.3.0/graphsight/dist/assets/diagram-5GNKFQAL-BmkDW3-M.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/diagram-KO2AKTUF-D_PC7ApA.js → graphsight-0.3.0/graphsight/dist/assets/diagram-KO2AKTUF-Bmc4Hn_O.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/diagram-LMA3HP47-BIyYFC4E.js → graphsight-0.3.0/graphsight/dist/assets/diagram-LMA3HP47-vfKcGnnt.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/diagram-OG6HWLK6-W3CKcEFl.js → graphsight-0.3.0/graphsight/dist/assets/diagram-OG6HWLK6-CsDKFBDx.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/erDiagram-TEJ5UH35-D6scDkhL.js → graphsight-0.3.0/graphsight/dist/assets/erDiagram-TEJ5UH35-CL6QLPh6.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/flowDiagram-I6XJVG4X-Bj_XdVV-.js → graphsight-0.3.0/graphsight/dist/assets/flowDiagram-I6XJVG4X-Dht1jxSH.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/ganttDiagram-6RSMTGT7-CBvqqbHJ.js → graphsight-0.3.0/graphsight/dist/assets/ganttDiagram-6RSMTGT7-Mrh5sBuC.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/gitGraphDiagram-PVQCEYII-by8Fq2bW.js → graphsight-0.3.0/graphsight/dist/assets/gitGraphDiagram-PVQCEYII-C_to9mh-.js +1 -1
- graphsight-0.3.0/graphsight/dist/assets/index-BA3uz4Sh.js +483 -0
- graphsight-0.3.0/graphsight/dist/assets/index-DR9ElM14.css +1 -0
- graphsight-0.2.0/graphsight/dist/assets/infoDiagram-5YYISTIA-1307Ve3t.js → graphsight-0.3.0/graphsight/dist/assets/infoDiagram-5YYISTIA-BfyE9D1p.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/ishikawaDiagram-YF4QCWOH-DQl6oden.js → graphsight-0.3.0/graphsight/dist/assets/ishikawaDiagram-YF4QCWOH-DljFoVr4.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/journeyDiagram-JHISSGLW-COdjWyKQ.js → graphsight-0.3.0/graphsight/dist/assets/journeyDiagram-JHISSGLW-DhfKGdiA.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/kanban-definition-UN3LZRKU-BoaAvorr.js → graphsight-0.3.0/graphsight/dist/assets/kanban-definition-UN3LZRKU-BtP5uFd_.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/linear-CmJqJ-n6.js → graphsight-0.3.0/graphsight/dist/assets/linear-E6Djxe1M.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/mermaid.core-B77A9b3a.js → graphsight-0.3.0/graphsight/dist/assets/mermaid.core-Cr4Ida0l.js +4 -4
- graphsight-0.2.0/graphsight/dist/assets/mindmap-definition-RKZ34NQL-4qBkCr9q.js → graphsight-0.3.0/graphsight/dist/assets/mindmap-definition-RKZ34NQL-DKsVzrC_.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/pieDiagram-4H26LBE5-C0UJig1b.js → graphsight-0.3.0/graphsight/dist/assets/pieDiagram-4H26LBE5-BLFeYvt8.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/quadrantDiagram-W4KKPZXB-DQSdxmL2.js → graphsight-0.3.0/graphsight/dist/assets/quadrantDiagram-W4KKPZXB-TOEOxf98.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/requirementDiagram-4Y6WPE33-D-XOmsTq.js → graphsight-0.3.0/graphsight/dist/assets/requirementDiagram-4Y6WPE33-lxDExpHS.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/sankeyDiagram-5OEKKPKP-F877OceW.js → graphsight-0.3.0/graphsight/dist/assets/sankeyDiagram-5OEKKPKP-Bt3RdNXe.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/sequenceDiagram-3UESZ5HK-CcxrPDRe.js → graphsight-0.3.0/graphsight/dist/assets/sequenceDiagram-3UESZ5HK-DJG0iUc8.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/stateDiagram-AJRCARHV-DGBGZ_xo.js → graphsight-0.3.0/graphsight/dist/assets/stateDiagram-AJRCARHV-a8qXFzmk.js +1 -1
- graphsight-0.3.0/graphsight/dist/assets/stateDiagram-v2-BHNVJYJU-C1SCEn23.js +1 -0
- graphsight-0.2.0/graphsight/dist/assets/timeline-definition-PNZ67QCA-Chr67AKg.js → graphsight-0.3.0/graphsight/dist/assets/timeline-definition-PNZ67QCA-D-vuX4Ci.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/vennDiagram-CIIHVFJN-JuYPgaLN.js → graphsight-0.3.0/graphsight/dist/assets/vennDiagram-CIIHVFJN-Cv9onzjp.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/wardley-L42UT6IY-DJty7ogt.js → graphsight-0.3.0/graphsight/dist/assets/wardley-L42UT6IY-D4ojyCVU.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/wardleyDiagram-YWT4CUSO-D5xm5gDN.js → graphsight-0.3.0/graphsight/dist/assets/wardleyDiagram-YWT4CUSO-Ck3lasbB.js +1 -1
- graphsight-0.2.0/graphsight/dist/assets/xychartDiagram-2RQKCTM6-D1MZmrg5.js → graphsight-0.3.0/graphsight/dist/assets/xychartDiagram-2RQKCTM6-Dy1S4t9K.js +1 -1
- {graphsight-0.2.0 → graphsight-0.3.0}/graphsight/dist/index.html +25 -25
- {graphsight-0.2.0 → graphsight-0.3.0}/graphsight/server.py +110 -110
- {graphsight-0.2.0 → graphsight-0.3.0/graphsight.egg-info}/PKG-INFO +1 -1
- graphsight-0.3.0/graphsight.egg-info/SOURCES.txt +69 -0
- {graphsight-0.2.0 → graphsight-0.3.0}/pyproject.toml +40 -40
- graphsight-0.3.0/tests/test_server.py +84 -0
- graphsight-0.2.0/graphsight/dist/assets/channel-B5gEPc6v.js +0 -1
- graphsight-0.2.0/graphsight/dist/assets/classDiagram-4FO5ZUOK-D5MvdHvc.js +0 -1
- graphsight-0.2.0/graphsight/dist/assets/classDiagram-v2-Q7XG4LA2-D5MvdHvc.js +0 -1
- graphsight-0.2.0/graphsight/dist/assets/index-48_-4Vab.js +0 -460
- graphsight-0.2.0/graphsight/dist/assets/index-BvyEzIL6.css +0 -1
- graphsight-0.2.0/graphsight/dist/assets/stateDiagram-v2-BHNVJYJU-BH0l1SFC.js +0 -1
- graphsight-0.2.0/graphsight.egg-info/SOURCES.txt +0 -68
- {graphsight-0.2.0 → graphsight-0.3.0}/graphsight/dist/assets/cytoscape.esm-DTSO7Bv0.js +0 -0
- {graphsight-0.2.0 → graphsight-0.3.0}/graphsight/dist/assets/defaultLocale-DX6XiGOO.js +0 -0
- {graphsight-0.2.0 → graphsight-0.3.0}/graphsight/dist/assets/graph-CAnANduQ.js +0 -0
- {graphsight-0.2.0 → graphsight-0.3.0}/graphsight/dist/assets/init-Gi6I4Gst.js +0 -0
- {graphsight-0.2.0 → graphsight-0.3.0}/graphsight/dist/assets/katex-C5jXJg4s.js +0 -0
- {graphsight-0.2.0 → graphsight-0.3.0}/graphsight/dist/assets/layout-DGIYPm2g.js +0 -0
- {graphsight-0.2.0 → graphsight-0.3.0}/graphsight/dist/assets/ordinal-Cboi1Yqb.js +0 -0
- {graphsight-0.2.0 → graphsight-0.3.0}/graphsight/dist/favicon.svg +0 -0
- {graphsight-0.2.0 → graphsight-0.3.0}/graphsight.egg-info/dependency_links.txt +0 -0
- {graphsight-0.2.0 → graphsight-0.3.0}/graphsight.egg-info/entry_points.txt +0 -0
- {graphsight-0.2.0 → graphsight-0.3.0}/graphsight.egg-info/top_level.txt +0 -0
- {graphsight-0.2.0 → graphsight-0.3.0}/setup.cfg +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Arush Karnatak
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Arush Karnatak
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
recursive-include graphsight/dist *
|
|
2
|
-
include LICENSE
|
|
1
|
+
recursive-include graphsight/dist *
|
|
2
|
+
include LICENSE
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: graphsight
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: See why your AI agent retrieved what it did — interactive graph viewer for agent retrieval traces. One command, zero dependencies, nothing leaves your machine.
|
|
5
5
|
Author: Arush Karnatak
|
|
6
6
|
License: MIT
|
|
@@ -1,152 +1,152 @@
|
|
|
1
|
-
# graphsight
|
|
2
|
-
|
|
3
|
-
[](https://pypi.org/project/graphsight/)
|
|
4
|
-
[](https://pypi.org/project/graphsight/)
|
|
5
|
-
[](https://github.com/Kcodess2807/graphsight/blob/main/graphsight/LICENSE)
|
|
6
|
-
|
|
7
|
-
**See exactly why your AI agent retrieved what it did.**
|
|
8
|
-
|
|
9
|
-
Your agent answered a question. Which documents did it actually pull? What
|
|
10
|
-
scores did they get? How are they connected to each other? Most stacks make
|
|
11
|
-
you dig through logs to answer that. Graphsight renders the run as an
|
|
12
|
-
**interactive graph in your browser** — one command, zero dependencies,
|
|
13
|
-
nothing leaves your machine.
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
pip install graphsight
|
|
17
|
-
graphsight path/to/trace_state.json
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## What you get
|
|
21
|
-
|
|
22
|
-
- **Every retrieved item as a typed node** — PR, Service, Person, Ticket,
|
|
23
|
-
Document, Repo, Library, Team, Tool — with its retrieval score.
|
|
24
|
-
- **Relational paths between results** — *person → authored → PR →
|
|
25
|
-
resolves → issue* — the chain of evidence, not just a ranked list.
|
|
26
|
-
- **An inspector on every node**: underlying content, score, source link.
|
|
27
|
-
- **The execution timeline** of the run: each agent step, each retriever
|
|
28
|
-
call, per-span timings, and which retrieval arm (vector / graph) produced
|
|
29
|
-
the results.
|
|
30
|
-
|
|
31
|
-
## Requirements
|
|
32
|
-
|
|
33
|
-
| | |
|
|
34
|
-
|---|---|
|
|
35
|
-
| Python | ≥ 3.10 |
|
|
36
|
-
| Runtime dependencies | **none** (stdlib only) |
|
|
37
|
-
| Platforms | Windows, macOS, Linux |
|
|
38
|
-
| Browser | any modern browser |
|
|
39
|
-
|
|
40
|
-
## Usage
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
graphsight [trace] [--port PORT] [--no-browser]
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
| Argument | Default | Description |
|
|
47
|
-
|---|---|---|
|
|
48
|
-
| `trace` | — | A `trace_state.json` file, **or a directory of them** (e.g. `.graphsight/`) to browse run history. Optional — omit to open the import page and drag-and-drop or paste JSON instead. |
|
|
49
|
-
| `--port` | `4630` | Local port to serve on. |
|
|
50
|
-
| `--no-browser` | off | Start the server without opening a browser window. |
|
|
51
|
-
|
|
52
|
-
The server binds to `127.0.0.1` only and runs until you press `Ctrl+C`.
|
|
53
|
-
|
|
54
|
-
## Run history
|
|
55
|
-
|
|
56
|
-
Point `graphsight` at a directory and it becomes a run browser — every
|
|
57
|
-
trace listed by query and time, one click to open:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
graphsight .graphsight/
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
The [graphsight-langgraph](https://pypi.org/project/graphsight-langgraph/)
|
|
64
|
-
`capture()` helper appends every agent run there automatically, so your
|
|
65
|
-
debugging history accumulates with zero ceremony. Traces render with the
|
|
66
|
-
**retrieved vs. used** split: items that surfaced in the answer highlighted,
|
|
67
|
-
items retrieved but ignored dimmed — the two classic retrieval failures,
|
|
68
|
-
visible at a glance.
|
|
69
|
-
|
|
70
|
-
## Sharing traces with your team
|
|
71
|
-
|
|
72
|
-
A trace is one self-contained JSON file — no account or backend needed to
|
|
73
|
-
share it:
|
|
74
|
-
|
|
75
|
-
- **Send the file.** A teammate with `graphsight` installed runs
|
|
76
|
-
`graphsight trace.json`. Works in a DM, a ticket attachment, a CI
|
|
77
|
-
artifact.
|
|
78
|
-
- **Link it.** A deployed Graphsight frontend opens any publicly reachable
|
|
79
|
-
trace via `…/memory/import?src=<url-to-json>` — host the JSON on a gist
|
|
80
|
-
or artifact store and share the link. (The host must allow cross-origin
|
|
81
|
-
GETs; raw gists do.)
|
|
82
|
-
- **Commit it.** Trace files in the repo next to the incident or PR they
|
|
83
|
-
explain make retrieval debugging part of the review record.
|
|
84
|
-
|
|
85
|
-
## Producing traces
|
|
86
|
-
|
|
87
|
-
Graphsight renders any file matching its trace JSON contract. Current
|
|
88
|
-
producers:
|
|
89
|
-
|
|
90
|
-
- **[graphsight-langgraph](https://pypi.org/project/graphsight-langgraph/)** —
|
|
91
|
-
instrument any [LangGraph](https://github.com/langchain-ai/langgraph)
|
|
92
|
-
agent with a single callback handler, or trace a GitHub repository in one
|
|
93
|
-
command:
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
pip install "graphsight-langgraph[example]"
|
|
97
|
-
graphsight-github-trace langchain-ai/langgraph "who fixed the recent streaming bugs?"
|
|
98
|
-
graphsight graphsight_out/trace_state.json
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
- **The TraceRAG engine** — the graph-memory backend this project grew out
|
|
102
|
-
of; its `/api/trace` responses are the same shape.
|
|
103
|
-
|
|
104
|
-
Adapters for LlamaIndex and raw OpenTelemetry spans are planned; all
|
|
105
|
-
producers emit the same schema and render in this same viewer.
|
|
106
|
-
|
|
107
|
-
### Writing your own producer
|
|
108
|
-
|
|
109
|
-
The minimum contract is small — a JSON object with:
|
|
110
|
-
|
|
111
|
-
```jsonc
|
|
112
|
-
{
|
|
113
|
-
"query": "the question that was asked", // required, string
|
|
114
|
-
"graph": {
|
|
115
|
-
"nodes": [{ "id", "label", "type", "score", "meta": { "snippet", "sourceUrl" } }],
|
|
116
|
-
"edges": [{ "id", "source", "target", "relation", "confidence" }]
|
|
117
|
-
},
|
|
118
|
-
"steps": [ /* execution timeline, optional */ ],
|
|
119
|
-
"metrics": { "queryTimeSec": 0.004 } // optional
|
|
120
|
-
}
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
Node positions are computed client-side; emitters never deal with layout.
|
|
124
|
-
The complete schema and a reference emitter live in the
|
|
125
|
-
[graphsight-langgraph source](https://github.com/Kcodess2807/graphsight/tree/main/graphsight-langgraph).
|
|
126
|
-
|
|
127
|
-
## Security and privacy
|
|
128
|
-
|
|
129
|
-
- The dependency list is empty by design: the UI is a bundled static build
|
|
130
|
-
(Vite + React + React Flow) served by Python's stdlib `http.server`.
|
|
131
|
-
- Binds to `127.0.0.1` — not reachable from other machines.
|
|
132
|
-
- No accounts, no telemetry, no outbound network calls. Your traces stay on
|
|
133
|
-
your disk.
|
|
134
|
-
|
|
135
|
-
## Troubleshooting
|
|
136
|
-
|
|
137
|
-
| Symptom | Cause / fix |
|
|
138
|
-
|---|---|
|
|
139
|
-
| `Address already in use` | Another process holds the port — pass `--port 4631`. |
|
|
140
|
-
| Browser doesn't open | Some environments (SSH, WSL, containers) can't launch one — start with `--no-browser` and open the printed URL yourself. |
|
|
141
|
-
| `Bundled UI missing` error | Broken installation — `pip install --force-reinstall graphsight`. |
|
|
142
|
-
| Page loads but trace doesn't | The JSON didn't match the contract — the import page shows the specific validation error. |
|
|
143
|
-
|
|
144
|
-
## Links
|
|
145
|
-
|
|
146
|
-
- Source & issue tracker: [github.com/Kcodess2807/graphsight](https://github.com/Kcodess2807/graphsight)
|
|
147
|
-
- LangGraph adapter: [graphsight-langgraph on PyPI](https://pypi.org/project/graphsight-langgraph/)
|
|
148
|
-
- Beta test script: [BETA.md](https://github.com/Kcodess2807/graphsight/blob/main/BETA.md)
|
|
149
|
-
|
|
150
|
-
## License
|
|
151
|
-
|
|
152
|
-
MIT © Arush Karnatak
|
|
1
|
+
# graphsight
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/graphsight/)
|
|
4
|
+
[](https://pypi.org/project/graphsight/)
|
|
5
|
+
[](https://github.com/Kcodess2807/graphsight/blob/main/graphsight/LICENSE)
|
|
6
|
+
|
|
7
|
+
**See exactly why your AI agent retrieved what it did.**
|
|
8
|
+
|
|
9
|
+
Your agent answered a question. Which documents did it actually pull? What
|
|
10
|
+
scores did they get? How are they connected to each other? Most stacks make
|
|
11
|
+
you dig through logs to answer that. Graphsight renders the run as an
|
|
12
|
+
**interactive graph in your browser** — one command, zero dependencies,
|
|
13
|
+
nothing leaves your machine.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install graphsight
|
|
17
|
+
graphsight path/to/trace_state.json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## What you get
|
|
21
|
+
|
|
22
|
+
- **Every retrieved item as a typed node** — PR, Service, Person, Ticket,
|
|
23
|
+
Document, Repo, Library, Team, Tool — with its retrieval score.
|
|
24
|
+
- **Relational paths between results** — *person → authored → PR →
|
|
25
|
+
resolves → issue* — the chain of evidence, not just a ranked list.
|
|
26
|
+
- **An inspector on every node**: underlying content, score, source link.
|
|
27
|
+
- **The execution timeline** of the run: each agent step, each retriever
|
|
28
|
+
call, per-span timings, and which retrieval arm (vector / graph) produced
|
|
29
|
+
the results.
|
|
30
|
+
|
|
31
|
+
## Requirements
|
|
32
|
+
|
|
33
|
+
| | |
|
|
34
|
+
|---|---|
|
|
35
|
+
| Python | ≥ 3.10 |
|
|
36
|
+
| Runtime dependencies | **none** (stdlib only) |
|
|
37
|
+
| Platforms | Windows, macOS, Linux |
|
|
38
|
+
| Browser | any modern browser |
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
graphsight [trace] [--port PORT] [--no-browser]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
| Argument | Default | Description |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| `trace` | — | A `trace_state.json` file, **or a directory of them** (e.g. `.graphsight/`) to browse run history. Optional — omit to open the import page and drag-and-drop or paste JSON instead. |
|
|
49
|
+
| `--port` | `4630` | Local port to serve on. |
|
|
50
|
+
| `--no-browser` | off | Start the server without opening a browser window. |
|
|
51
|
+
|
|
52
|
+
The server binds to `127.0.0.1` only and runs until you press `Ctrl+C`.
|
|
53
|
+
|
|
54
|
+
## Run history
|
|
55
|
+
|
|
56
|
+
Point `graphsight` at a directory and it becomes a run browser — every
|
|
57
|
+
trace listed by query and time, one click to open:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
graphsight .graphsight/
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The [graphsight-langgraph](https://pypi.org/project/graphsight-langgraph/)
|
|
64
|
+
`capture()` helper appends every agent run there automatically, so your
|
|
65
|
+
debugging history accumulates with zero ceremony. Traces render with the
|
|
66
|
+
**retrieved vs. used** split: items that surfaced in the answer highlighted,
|
|
67
|
+
items retrieved but ignored dimmed — the two classic retrieval failures,
|
|
68
|
+
visible at a glance.
|
|
69
|
+
|
|
70
|
+
## Sharing traces with your team
|
|
71
|
+
|
|
72
|
+
A trace is one self-contained JSON file — no account or backend needed to
|
|
73
|
+
share it:
|
|
74
|
+
|
|
75
|
+
- **Send the file.** A teammate with `graphsight` installed runs
|
|
76
|
+
`graphsight trace.json`. Works in a DM, a ticket attachment, a CI
|
|
77
|
+
artifact.
|
|
78
|
+
- **Link it.** A deployed Graphsight frontend opens any publicly reachable
|
|
79
|
+
trace via `…/memory/import?src=<url-to-json>` — host the JSON on a gist
|
|
80
|
+
or artifact store and share the link. (The host must allow cross-origin
|
|
81
|
+
GETs; raw gists do.)
|
|
82
|
+
- **Commit it.** Trace files in the repo next to the incident or PR they
|
|
83
|
+
explain make retrieval debugging part of the review record.
|
|
84
|
+
|
|
85
|
+
## Producing traces
|
|
86
|
+
|
|
87
|
+
Graphsight renders any file matching its trace JSON contract. Current
|
|
88
|
+
producers:
|
|
89
|
+
|
|
90
|
+
- **[graphsight-langgraph](https://pypi.org/project/graphsight-langgraph/)** —
|
|
91
|
+
instrument any [LangGraph](https://github.com/langchain-ai/langgraph)
|
|
92
|
+
agent with a single callback handler, or trace a GitHub repository in one
|
|
93
|
+
command:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
pip install "graphsight-langgraph[example]"
|
|
97
|
+
graphsight-github-trace langchain-ai/langgraph "who fixed the recent streaming bugs?"
|
|
98
|
+
graphsight graphsight_out/trace_state.json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
- **The TraceRAG engine** — the graph-memory backend this project grew out
|
|
102
|
+
of; its `/api/trace` responses are the same shape.
|
|
103
|
+
|
|
104
|
+
Adapters for LlamaIndex and raw OpenTelemetry spans are planned; all
|
|
105
|
+
producers emit the same schema and render in this same viewer.
|
|
106
|
+
|
|
107
|
+
### Writing your own producer
|
|
108
|
+
|
|
109
|
+
The minimum contract is small — a JSON object with:
|
|
110
|
+
|
|
111
|
+
```jsonc
|
|
112
|
+
{
|
|
113
|
+
"query": "the question that was asked", // required, string
|
|
114
|
+
"graph": {
|
|
115
|
+
"nodes": [{ "id", "label", "type", "score", "meta": { "snippet", "sourceUrl" } }],
|
|
116
|
+
"edges": [{ "id", "source", "target", "relation", "confidence" }]
|
|
117
|
+
},
|
|
118
|
+
"steps": [ /* execution timeline, optional */ ],
|
|
119
|
+
"metrics": { "queryTimeSec": 0.004 } // optional
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Node positions are computed client-side; emitters never deal with layout.
|
|
124
|
+
The complete schema and a reference emitter live in the
|
|
125
|
+
[graphsight-langgraph source](https://github.com/Kcodess2807/graphsight/tree/main/graphsight-langgraph).
|
|
126
|
+
|
|
127
|
+
## Security and privacy
|
|
128
|
+
|
|
129
|
+
- The dependency list is empty by design: the UI is a bundled static build
|
|
130
|
+
(Vite + React + React Flow) served by Python's stdlib `http.server`.
|
|
131
|
+
- Binds to `127.0.0.1` — not reachable from other machines.
|
|
132
|
+
- No accounts, no telemetry, no outbound network calls. Your traces stay on
|
|
133
|
+
your disk.
|
|
134
|
+
|
|
135
|
+
## Troubleshooting
|
|
136
|
+
|
|
137
|
+
| Symptom | Cause / fix |
|
|
138
|
+
|---|---|
|
|
139
|
+
| `Address already in use` | Another process holds the port — pass `--port 4631`. |
|
|
140
|
+
| Browser doesn't open | Some environments (SSH, WSL, containers) can't launch one — start with `--no-browser` and open the printed URL yourself. |
|
|
141
|
+
| `Bundled UI missing` error | Broken installation — `pip install --force-reinstall graphsight`. |
|
|
142
|
+
| Page loads but trace doesn't | The JSON didn't match the contract — the import page shows the specific validation error. |
|
|
143
|
+
|
|
144
|
+
## Links
|
|
145
|
+
|
|
146
|
+
- Source & issue tracker: [github.com/Kcodess2807/graphsight](https://github.com/Kcodess2807/graphsight)
|
|
147
|
+
- LangGraph adapter: [graphsight-langgraph on PyPI](https://pypi.org/project/graphsight-langgraph/)
|
|
148
|
+
- Beta test script: [BETA.md](https://github.com/Kcodess2807/graphsight/blob/main/BETA.md)
|
|
149
|
+
|
|
150
|
+
## License
|
|
151
|
+
|
|
152
|
+
MIT © Arush Karnatak
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"""graphsight — local viewer for agent retrieval traces.
|
|
2
|
-
|
|
3
|
-
Usage:
|
|
4
|
-
|
|
5
|
-
graphsight path/to/trace_state.json
|
|
6
|
-
|
|
7
|
-
Serves the bundled Graphsight Studio UI locally and opens the trace in the
|
|
8
|
-
browser. No backend, no accounts, no network calls beyond localhost.
|
|
9
|
-
"""
|
|
10
|
-
|
|
11
|
-
__version__ = "0.
|
|
1
|
+
"""graphsight — local viewer for agent retrieval traces.
|
|
2
|
+
|
|
3
|
+
Usage:
|
|
4
|
+
|
|
5
|
+
graphsight path/to/trace_state.json
|
|
6
|
+
|
|
7
|
+
Serves the bundled Graphsight Studio UI locally and opens the trace in the
|
|
8
|
+
browser. No backend, no accounts, no network calls beyond localhost.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
__version__ = "0.3.0"
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
"""graphsight CLI — open a trace (or a whole run history) in the bundled UI."""
|
|
2
|
-
from __future__ import annotations
|
|
3
|
-
|
|
4
|
-
import argparse
|
|
5
|
-
import sys
|
|
6
|
-
import webbrowser
|
|
7
|
-
from pathlib import Path
|
|
8
|
-
from typing import Optional
|
|
9
|
-
|
|
10
|
-
from .server import RUNS_ROUTE, TRACE_ROUTE, make_server
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def main(argv: Optional[list[str]] = None) -> None:
|
|
14
|
-
for stream in (sys.stdout, sys.stderr):
|
|
15
|
-
try:
|
|
16
|
-
stream.reconfigure(encoding="utf-8") # type: ignore[union-attr]
|
|
17
|
-
except (AttributeError, OSError):
|
|
18
|
-
pass
|
|
19
|
-
|
|
20
|
-
parser = argparse.ArgumentParser(
|
|
21
|
-
prog="graphsight",
|
|
22
|
-
description="Open a trace_state.json — or a history directory like .graphsight/ — in your browser.",
|
|
23
|
-
)
|
|
24
|
-
parser.add_argument("trace", nargs="?", type=Path,
|
|
25
|
-
help="a trace_state.json, or a directory of them (e.g. .graphsight/); "
|
|
26
|
-
"omit to open the import page")
|
|
27
|
-
parser.add_argument("--port", type=int, default=4630, help="port to serve on (default 4630)")
|
|
28
|
-
parser.add_argument("--no-browser", action="store_true", help="don't open the browser")
|
|
29
|
-
args = parser.parse_args(argv)
|
|
30
|
-
|
|
31
|
-
trace_path: Optional[Path] = None
|
|
32
|
-
history_dir: Optional[Path] = None
|
|
33
|
-
if args.trace is not None:
|
|
34
|
-
target = args.trace.resolve()
|
|
35
|
-
if target.is_dir():
|
|
36
|
-
history_dir = target
|
|
37
|
-
elif target.is_file():
|
|
38
|
-
trace_path = target
|
|
39
|
-
else:
|
|
40
|
-
parser.error(f"not found: {target}")
|
|
41
|
-
|
|
42
|
-
server = make_server(args.port, trace_path=trace_path, history_dir=history_dir)
|
|
43
|
-
url = f"http://127.0.0.1:{args.port}/memory/import"
|
|
44
|
-
if trace_path is not None:
|
|
45
|
-
url += f"?src={TRACE_ROUTE}"
|
|
46
|
-
elif history_dir is not None:
|
|
47
|
-
url += f"?runs={RUNS_ROUTE}"
|
|
48
|
-
|
|
49
|
-
print(f"graphsight serving at {url}")
|
|
50
|
-
if trace_path is not None:
|
|
51
|
-
print(f"trace: {trace_path}")
|
|
52
|
-
if history_dir is not None:
|
|
53
|
-
print(f"history: {history_dir}")
|
|
54
|
-
print("Ctrl+C to stop")
|
|
55
|
-
if not args.no_browser:
|
|
56
|
-
webbrowser.open(url)
|
|
57
|
-
try:
|
|
58
|
-
server.serve_forever()
|
|
59
|
-
except KeyboardInterrupt:
|
|
60
|
-
print("\nbye")
|
|
61
|
-
finally:
|
|
62
|
-
server.server_close()
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if __name__ == "__main__":
|
|
66
|
-
main()
|
|
1
|
+
"""graphsight CLI — open a trace (or a whole run history) in the bundled UI."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import argparse
|
|
5
|
+
import sys
|
|
6
|
+
import webbrowser
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import Optional
|
|
9
|
+
|
|
10
|
+
from .server import RUNS_ROUTE, TRACE_ROUTE, make_server
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def main(argv: Optional[list[str]] = None) -> None:
|
|
14
|
+
for stream in (sys.stdout, sys.stderr):
|
|
15
|
+
try:
|
|
16
|
+
stream.reconfigure(encoding="utf-8") # type: ignore[union-attr]
|
|
17
|
+
except (AttributeError, OSError):
|
|
18
|
+
pass
|
|
19
|
+
|
|
20
|
+
parser = argparse.ArgumentParser(
|
|
21
|
+
prog="graphsight",
|
|
22
|
+
description="Open a trace_state.json — or a history directory like .graphsight/ — in your browser.",
|
|
23
|
+
)
|
|
24
|
+
parser.add_argument("trace", nargs="?", type=Path,
|
|
25
|
+
help="a trace_state.json, or a directory of them (e.g. .graphsight/); "
|
|
26
|
+
"omit to open the import page")
|
|
27
|
+
parser.add_argument("--port", type=int, default=4630, help="port to serve on (default 4630)")
|
|
28
|
+
parser.add_argument("--no-browser", action="store_true", help="don't open the browser")
|
|
29
|
+
args = parser.parse_args(argv)
|
|
30
|
+
|
|
31
|
+
trace_path: Optional[Path] = None
|
|
32
|
+
history_dir: Optional[Path] = None
|
|
33
|
+
if args.trace is not None:
|
|
34
|
+
target = args.trace.resolve()
|
|
35
|
+
if target.is_dir():
|
|
36
|
+
history_dir = target
|
|
37
|
+
elif target.is_file():
|
|
38
|
+
trace_path = target
|
|
39
|
+
else:
|
|
40
|
+
parser.error(f"not found: {target}")
|
|
41
|
+
|
|
42
|
+
server = make_server(args.port, trace_path=trace_path, history_dir=history_dir)
|
|
43
|
+
url = f"http://127.0.0.1:{args.port}/memory/import"
|
|
44
|
+
if trace_path is not None:
|
|
45
|
+
url += f"?src={TRACE_ROUTE}"
|
|
46
|
+
elif history_dir is not None:
|
|
47
|
+
url += f"?runs={RUNS_ROUTE}"
|
|
48
|
+
|
|
49
|
+
print(f"graphsight serving at {url}")
|
|
50
|
+
if trace_path is not None:
|
|
51
|
+
print(f"trace: {trace_path}")
|
|
52
|
+
if history_dir is not None:
|
|
53
|
+
print(f"history: {history_dir}")
|
|
54
|
+
print("Ctrl+C to stop")
|
|
55
|
+
if not args.no_browser:
|
|
56
|
+
webbrowser.open(url)
|
|
57
|
+
try:
|
|
58
|
+
server.serve_forever()
|
|
59
|
+
except KeyboardInterrupt:
|
|
60
|
+
print("\nbye")
|
|
61
|
+
finally:
|
|
62
|
+
server.server_close()
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
if __name__ == "__main__":
|
|
66
|
+
main()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as ln,a0 as an,a1 as G,a2 as q,a3 as z,a4 as un,a5 as y,a6 as tn,a7 as K,a8 as _,a9 as rn,aa as o,ab as on,ac as sn,ad as fn}from"./mermaid.core-
|
|
1
|
+
import{$ as ln,a0 as an,a1 as G,a2 as q,a3 as z,a4 as un,a5 as y,a6 as tn,a7 as K,a8 as _,a9 as rn,aa as o,ab as on,ac as sn,ad as fn}from"./mermaid.core-Cr4Ida0l.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,B,a){var O=I-l,i=D-h,n=B-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function V(l,h,I,D,v,A,B){var a=l-I,O=h-D,i=(B?A:-A)/K(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,C=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*K(on(0,T*T*R-P*P)),$=(P*g-m*S)/R,j=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=$-C,e=j-t,r=w-C,F=p-t;return x*x+e*e>r*r+F*F&&($=w,j=p),{cx:$,cy:j,x01:-n,y01:-d,x11:$*(v/T-1),y11:j*(v/T-1)}}function hn(){var l=cn,h=yn,I=z(0),D=null,v=gn,A=dn,B=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,C=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(C>tn-y)a.moveTo(s*G(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*G(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=C,S=C,$=B.apply(this,arguments)/2,j=$>y&&(D?+D.apply(this,arguments):K(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(j>y){var F=sn(j/u*q($)),L=sn(j/s*q($));(P-=F*2)>y?(F*=t?1:-1,R+=F,T-=F):(P=0,R=T=(f+c)/2),(S-=L*2)>y?(L*=t?1:-1,m+=L,g-=L):(S=0,m=g=(f+c)/2)}var H=s*G(m),J=s*q(m),M=u*G(T),N=u*q(T);if(w>y){var Q=s*G(g),U=s*q(g),W=u*G(R),X=u*q(R),E;if(C<an)if(E=pn(H,J,W,X,Q,U,M,N)){var Y=H-E[0],Z=J-E[1],b=Q-E[0],k=U-E[1],nn=1/q(fn((Y*b+Z*k)/(K(Y*Y+Z*Z)*K(b*b+k*k)))/2),en=K(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=V(W,X,H,J,s,x,t),r=V(Q,U,M,N,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(H,J),a.arc(0,0,s,m,g,!t)):a.moveTo(H,J),!(u>y)||!(P>y)?a.lineTo(M,N):p>y?(e=V(M,N,Q,U,u,-p,t),r=V(H,J,W,X,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[G(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:z(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:z(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:z(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:z(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:z(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:z(+n),i):A},i.padAngle=function(n){return arguments.length?(B=typeof n=="function"?n:z(+n),i):B},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
|