graphwiki 0.1.0__py3-none-any.whl
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.
- graphwiki/__init__.py +12 -0
- graphwiki/__main__.py +6 -0
- graphwiki/assets/README.md +22 -0
- graphwiki/assets/mermaid.min.js +3587 -0
- graphwiki/bootstrap.py +118 -0
- graphwiki/cli.py +1015 -0
- graphwiki/context.py +177 -0
- graphwiki/emit.py +129 -0
- graphwiki/gates.py +289 -0
- graphwiki/graph_client.py +698 -0
- graphwiki/logging_util.py +127 -0
- graphwiki/mcp_server.py +204 -0
- graphwiki/plan.py +320 -0
- graphwiki/py.typed +0 -0
- graphwiki/render.py +190 -0
- graphwiki/state.py +61 -0
- graphwiki/types.py +100 -0
- graphwiki/watch.py +96 -0
- graphwiki/web.py +689 -0
- graphwiki/writer.py +460 -0
- graphwiki-0.1.0.dist-info/METADATA +258 -0
- graphwiki-0.1.0.dist-info/RECORD +24 -0
- graphwiki-0.1.0.dist-info/WHEEL +4 -0
- graphwiki-0.1.0.dist-info/entry_points.txt +3 -0
graphwiki/__init__.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""graphwiki — graph-grounded code wiki generator.
|
|
2
|
+
|
|
3
|
+
Deterministic graph traversal builds the concept work-list; the LLM writes only
|
|
4
|
+
the prose body per page. Standalone; depends on codebase-memory-mcp (MCP) and any
|
|
5
|
+
OpenAI-compatible model endpoint.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from importlib.metadata import version as _version
|
|
9
|
+
|
|
10
|
+
# Single-sourced from installed package metadata (pyproject.toml is authoritative);
|
|
11
|
+
# no second copy of the version number to drift out of sync.
|
|
12
|
+
__version__ = _version("graphwiki")
|
graphwiki/__main__.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Vendored viewer assets
|
|
2
|
+
|
|
3
|
+
`mermaid.min.js` — the **self-contained UMD** build of [Mermaid] v11, bundled so
|
|
4
|
+
the web viewer (`graphwiki serve`) renders diagrams with **no CDN / no network**
|
|
5
|
+
(air-gapped safe). It exposes `window.mermaid` when loaded via a classic
|
|
6
|
+
`<script>` tag; `src/graphwiki/web.py` serves it at `/assets/mermaid.min.js` and
|
|
7
|
+
falls back to the jsDelivr CDN only when this file is absent.
|
|
8
|
+
|
|
9
|
+
Do **not** use the `.../mermaid@11/+esm` endpoint here: that bundle lazy-loads
|
|
10
|
+
~50 diagram chunks and dependency modules from jsDelivr at runtime, so it breaks
|
|
11
|
+
offline. The `dist/mermaid.min.js` UMD build inlines everything.
|
|
12
|
+
|
|
13
|
+
## Refresh (pin to a new Mermaid version)
|
|
14
|
+
|
|
15
|
+
curl -L https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js \
|
|
16
|
+
-o src/graphwiki/assets/mermaid.min.js
|
|
17
|
+
|
|
18
|
+
Verify it is self-contained (should print `0`):
|
|
19
|
+
|
|
20
|
+
grep -c '"/npm/' src/graphwiki/assets/mermaid.min.js
|
|
21
|
+
|
|
22
|
+
[Mermaid]: https://mermaid.js.org/
|