polycodegraph 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.
- codegraph/__init__.py +10 -0
- codegraph/analysis/__init__.py +30 -0
- codegraph/analysis/_common.py +125 -0
- codegraph/analysis/blast_radius.py +63 -0
- codegraph/analysis/cycles.py +79 -0
- codegraph/analysis/dataflow.py +861 -0
- codegraph/analysis/dead_code.py +165 -0
- codegraph/analysis/hotspots.py +68 -0
- codegraph/analysis/infrastructure.py +439 -0
- codegraph/analysis/metrics.py +52 -0
- codegraph/analysis/report.py +222 -0
- codegraph/analysis/roles.py +323 -0
- codegraph/analysis/untested.py +79 -0
- codegraph/cli.py +1506 -0
- codegraph/config.py +64 -0
- codegraph/embed/__init__.py +35 -0
- codegraph/embed/chunker.py +120 -0
- codegraph/embed/embedder.py +113 -0
- codegraph/embed/query.py +181 -0
- codegraph/embed/store.py +360 -0
- codegraph/graph/__init__.py +0 -0
- codegraph/graph/builder.py +212 -0
- codegraph/graph/schema.py +69 -0
- codegraph/graph/store_networkx.py +55 -0
- codegraph/graph/store_sqlite.py +249 -0
- codegraph/mcp_server/__init__.py +6 -0
- codegraph/mcp_server/server.py +933 -0
- codegraph/parsers/__init__.py +0 -0
- codegraph/parsers/base.py +70 -0
- codegraph/parsers/go.py +570 -0
- codegraph/parsers/python.py +1707 -0
- codegraph/parsers/typescript.py +1397 -0
- codegraph/py.typed +0 -0
- codegraph/resolve/__init__.py +4 -0
- codegraph/resolve/calls.py +480 -0
- codegraph/review/__init__.py +31 -0
- codegraph/review/baseline.py +32 -0
- codegraph/review/differ.py +211 -0
- codegraph/review/hook.py +70 -0
- codegraph/review/risk.py +219 -0
- codegraph/review/rules.py +342 -0
- codegraph/viz/__init__.py +17 -0
- codegraph/viz/_style.py +45 -0
- codegraph/viz/dashboard.py +740 -0
- codegraph/viz/diagrams.py +370 -0
- codegraph/viz/explore.py +453 -0
- codegraph/viz/hld.py +683 -0
- codegraph/viz/html.py +115 -0
- codegraph/viz/mermaid.py +111 -0
- codegraph/viz/svg.py +77 -0
- codegraph/web/__init__.py +4 -0
- codegraph/web/server.py +165 -0
- codegraph/web/static/app.css +664 -0
- codegraph/web/static/app.js +919 -0
- codegraph/web/static/index.html +112 -0
- codegraph/web/static/views/architecture.js +1671 -0
- codegraph/web/static/views/graph3d.css +564 -0
- codegraph/web/static/views/graph3d.js +999 -0
- codegraph/web/static/views/graph3d_transform.js +984 -0
- codegraph/workspace/__init__.py +34 -0
- codegraph/workspace/config.py +110 -0
- codegraph/workspace/operations.py +294 -0
- polycodegraph-0.1.0.dist-info/METADATA +687 -0
- polycodegraph-0.1.0.dist-info/RECORD +67 -0
- polycodegraph-0.1.0.dist-info/WHEEL +4 -0
- polycodegraph-0.1.0.dist-info/entry_points.txt +2 -0
- polycodegraph-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
+
<title>codegraph</title>
|
|
7
|
+
<link rel="preconnect" href="https://rsms.me/">
|
|
8
|
+
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
|
|
9
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
10
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
11
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap">
|
|
12
|
+
<script src="https://cdn.tailwindcss.com"></script>
|
|
13
|
+
<script>
|
|
14
|
+
tailwind.config = {
|
|
15
|
+
theme: {
|
|
16
|
+
extend: {
|
|
17
|
+
fontFamily: {
|
|
18
|
+
sans: ['Inter var', 'Inter', 'system-ui', 'sans-serif'],
|
|
19
|
+
mono: ['"JetBrains Mono"', 'ui-monospace', 'SFMono-Regular', 'Menlo', 'monospace'],
|
|
20
|
+
},
|
|
21
|
+
colors: {
|
|
22
|
+
ink: { 950:'#05070d', 900:'#0a0f1c', 800:'#0f1626', 700:'#161f33',
|
|
23
|
+
600:'#1d2942', 500:'#2a3957', 400:'#3b4a6a', 300:'#5b6b8c',
|
|
24
|
+
200:'#8b9ab8', 100:'#c4cfe2', 50:'#e6ecf5' },
|
|
25
|
+
brand: { 700:'#4f46e5', 600:'#6366f1', 500:'#818cf8', 400:'#a5b4fc', 300:'#c7d2fe' },
|
|
26
|
+
accent: { cyan:'#22d3ee', emerald:'#34d399', amber:'#fbbf24',
|
|
27
|
+
rose:'#f87171', violet:'#a78bfa', orange:'#fb923c' },
|
|
28
|
+
},
|
|
29
|
+
boxShadow: {
|
|
30
|
+
'card': '0 1px 0 0 rgba(255,255,255,0.04) inset, 0 12px 32px -16px rgba(0,0,0,0.65)',
|
|
31
|
+
'glow': '0 0 0 1px rgba(129,140,248,0.4), 0 0 32px -8px rgba(129,140,248,0.45)',
|
|
32
|
+
},
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
</script>
|
|
37
|
+
<script src="https://d3js.org/d3.v7.min.js"></script>
|
|
38
|
+
<script src="https://cdn.jsdelivr.net/npm/d3-sankey@0.12.3/dist/d3-sankey.min.js"></script>
|
|
39
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@10.9.1/dist/mermaid.min.js"></script>
|
|
40
|
+
<script src="https://unpkg.com/lucide@0.414.0"></script>
|
|
41
|
+
<link rel="stylesheet" href="/static/app.css">
|
|
42
|
+
<link rel="stylesheet" href="/static/views/graph3d.css">
|
|
43
|
+
</head>
|
|
44
|
+
<body class="text-ink-50 font-sans antialiased min-h-screen" id="app-body">
|
|
45
|
+
<div class="app-bg"></div>
|
|
46
|
+
<div class="flex min-h-screen relative" id="app-shell">
|
|
47
|
+
<!-- Sidebar -->
|
|
48
|
+
<aside id="sidebar" class="w-60 shrink-0 border-r border-ink-600/60 bg-ink-900/70 backdrop-blur flex flex-col sticky top-0 h-screen transition-[width] duration-200">
|
|
49
|
+
<div class="px-5 py-5 border-b border-ink-600/60 flex items-center gap-2.5">
|
|
50
|
+
<div class="w-9 h-9 rounded-lg bg-gradient-to-br from-brand-500 via-brand-600 to-accent-cyan flex items-center justify-center text-ink-950 font-bold text-sm shadow-glow flex-none">cg</div>
|
|
51
|
+
<div class="min-w-0 sb-label">
|
|
52
|
+
<div class="font-semibold text-sm tracking-tight">codegraph</div>
|
|
53
|
+
<div class="text-[11px] text-ink-200 truncate" id="repo-name">loading…</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
<nav class="flex-1 p-3 space-y-0.5 overflow-y-auto" id="nav"></nav>
|
|
57
|
+
<div class="p-3 border-t border-ink-600/60 space-y-2">
|
|
58
|
+
<button id="rebuild-btn" class="w-full flex items-center justify-center gap-2 rounded-md bg-ink-700/80 hover:bg-ink-600 text-sm py-2 transition border border-ink-500/60 hover:border-brand-500">
|
|
59
|
+
<i data-lucide="refresh-cw" class="w-3.5 h-3.5 flex-none"></i><span class="sb-label">Rebuild</span>
|
|
60
|
+
</button>
|
|
61
|
+
<div class="text-[10px] text-ink-300 text-center font-mono sb-label" id="last-built"></div>
|
|
62
|
+
</div>
|
|
63
|
+
</aside>
|
|
64
|
+
|
|
65
|
+
<!-- Main -->
|
|
66
|
+
<main class="flex-1 min-w-0 flex flex-col">
|
|
67
|
+
<header class="sticky top-0 z-10 border-b border-ink-600/60 bg-ink-900/70 backdrop-blur px-6 md:px-8 py-4 flex items-center justify-between gap-4">
|
|
68
|
+
<div class="flex items-center gap-3 min-w-0">
|
|
69
|
+
<button id="sb-toggle" class="icon-btn" title="Toggle sidebar" aria-label="Toggle sidebar">
|
|
70
|
+
<i data-lucide="panel-left"></i>
|
|
71
|
+
</button>
|
|
72
|
+
<div class="min-w-0">
|
|
73
|
+
<div class="text-[11px] uppercase tracking-[0.14em] text-ink-300 font-medium" id="crumb">Dashboard</div>
|
|
74
|
+
<h1 class="text-lg font-semibold mt-0.5 tracking-tight truncate" id="page-title">Overview</h1>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="flex items-center gap-2 text-xs text-ink-200">
|
|
78
|
+
<div id="header-stats" class="flex items-center gap-2"></div>
|
|
79
|
+
<button id="theme-toggle" class="icon-btn ml-1" title="Toggle theme" aria-label="Toggle theme">
|
|
80
|
+
<i data-lucide="moon" class="theme-dark-only"></i>
|
|
81
|
+
<i data-lucide="sun" class="theme-light-only"></i>
|
|
82
|
+
</button>
|
|
83
|
+
</div>
|
|
84
|
+
</header>
|
|
85
|
+
<div class="flex-1 overflow-y-auto" id="view-host">
|
|
86
|
+
<div class="flex items-center justify-center h-full">
|
|
87
|
+
<div class="text-ink-200 text-sm flex items-center gap-2"><div class="spinner"></div><span>Loading data…</span></div>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</main>
|
|
91
|
+
</div>
|
|
92
|
+
<div id="tooltip" class="pointer-events-none fixed opacity-0 transition-opacity z-50 bg-ink-700/95 backdrop-blur border border-ink-500/80 rounded-md px-3 py-2 text-xs shadow-card max-w-sm"></div>
|
|
93
|
+
<div id="toast-host" class="fixed bottom-4 right-4 z-50 space-y-2"></div>
|
|
94
|
+
<script src="/static/views/graph3d_transform.js"></script>
|
|
95
|
+
<script src="/static/views/graph3d.js"></script>
|
|
96
|
+
<script src="/static/views/architecture.js"></script>
|
|
97
|
+
<!-- three-spritetext (ESM via esm.sh): pulls its own three bundle and exposes
|
|
98
|
+
a SpriteText class. Used by graph3d.js for always-visible node + edge
|
|
99
|
+
labels. Silently no-op if esm.sh is unreachable; HTML hover labels remain. -->
|
|
100
|
+
<script type="module">
|
|
101
|
+
try {
|
|
102
|
+
const mod = await import('https://esm.sh/three-spritetext@1.10.0');
|
|
103
|
+
window.SpriteText = mod.default || mod.SpriteText || mod;
|
|
104
|
+
window.dispatchEvent(new Event('cg-spritetext-ready'));
|
|
105
|
+
} catch (e) {
|
|
106
|
+
// esm.sh blocked or offline — leave window.SpriteText undefined and
|
|
107
|
+
// let graph3d.js fall back to HTML hover labels.
|
|
108
|
+
}
|
|
109
|
+
</script>
|
|
110
|
+
<script src="/static/app.js"></script>
|
|
111
|
+
</body>
|
|
112
|
+
</html>
|