blastdiff 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.
- blastdiff/__init__.py +3 -0
- blastdiff/__main__.py +8 -0
- blastdiff/cli.py +448 -0
- blastdiff/core/__init__.py +5 -0
- blastdiff/core/blast_radius.py +456 -0
- blastdiff/core/diff_parser.py +368 -0
- blastdiff/core/languages/__init__.py +17 -0
- blastdiff/core/languages/base.py +111 -0
- blastdiff/core/languages/go_lang.py +219 -0
- blastdiff/core/languages/python_lang.py +226 -0
- blastdiff/core/languages/rust_lang.py +230 -0
- blastdiff/core/languages/ts_lang.py +406 -0
- blastdiff/core/models.py +281 -0
- blastdiff/core/proof.py +257 -0
- blastdiff/core/story.py +566 -0
- blastdiff/core/symbol_impact.py +698 -0
- blastdiff/engine.py +398 -0
- blastdiff/export.py +160 -0
- blastdiff/git_adapter.py +503 -0
- blastdiff/mcp_server.py +589 -0
- blastdiff/server.py +438 -0
- blastdiff/store.py +502 -0
- blastdiff/web/app.js +2387 -0
- blastdiff/web/index.html +272 -0
- blastdiff/web/styles.css +2092 -0
- blastdiff-0.1.0.dist-info/METADATA +186 -0
- blastdiff-0.1.0.dist-info/RECORD +31 -0
- blastdiff-0.1.0.dist-info/WHEEL +5 -0
- blastdiff-0.1.0.dist-info/entry_points.txt +2 -0
- blastdiff-0.1.0.dist-info/licenses/LICENSE +21 -0
- blastdiff-0.1.0.dist-info/top_level.txt +1 -0
blastdiff/web/index.html
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
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.0">
|
|
6
|
+
<title>BlastDiff — Local Diff Review & Blast-Radius Workbench</title>
|
|
7
|
+
<link rel="stylesheet" href="/static/styles.css?v=4">
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="app" class="app-shell">
|
|
11
|
+
<!-- Top Mission Bar -->
|
|
12
|
+
<header class="mission-bar">
|
|
13
|
+
<div class="mission-left">
|
|
14
|
+
<div class="brand">
|
|
15
|
+
<svg class="brand-icon" viewBox="0 0 24 24" width="20" height="20" fill="none" aria-hidden="true">
|
|
16
|
+
<rect x="2.5" y="2.5" width="19" height="19" rx="4" stroke="currentColor" stroke-width="1.8"/>
|
|
17
|
+
<path d="M7.5 12.2L10.6 15.3L16.8 8.8" stroke="#3fb950" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/>
|
|
18
|
+
</svg>
|
|
19
|
+
<span class="brand-name">BlastDiff</span>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<div class="repo-context" id="repo-context">
|
|
23
|
+
<span class="repo-name" id="repo-name">Loading...</span>
|
|
24
|
+
<span class="ctx-sep">/</span>
|
|
25
|
+
<span class="branch-badge" id="branch-name">-</span>
|
|
26
|
+
<span class="ctx-vs">vs</span>
|
|
27
|
+
<select id="base-ref-select" class="base-ref-select" aria-label="Compare against Git base ref" title="Switch base Git ref to compare against">
|
|
28
|
+
<option value="">HEAD (working tree)</option>
|
|
29
|
+
</select>
|
|
30
|
+
<span class="speed-badge" id="analysis-ms" title="Local deterministic analysis time">-- ms</span>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div class="mission-kpis" id="kpi-bar">
|
|
35
|
+
<div class="kpi-pill" title="Changed files in scope">
|
|
36
|
+
<span class="kpi-label">Files</span>
|
|
37
|
+
<span class="kpi-value" id="kpi-files">0</span>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="kpi-pill" id="kpi-hazards-pill" title="Deterministic hazards detected">
|
|
40
|
+
<span class="kpi-label">Hazards</span>
|
|
41
|
+
<span class="kpi-value" id="kpi-hazards">0</span>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="kpi-pill" id="kpi-callers-pill" title="Untouched external callers affected by symbol changes">
|
|
44
|
+
<span class="kpi-label">Untouched Callers</span>
|
|
45
|
+
<span class="kpi-value" id="kpi-callers">0</span>
|
|
46
|
+
</div>
|
|
47
|
+
<div class="kpi-pill" id="kpi-coverage-pill" title="Diff added-line test coverage">
|
|
48
|
+
<span class="kpi-label">Diff Coverage</span>
|
|
49
|
+
<span class="kpi-value" id="kpi-coverage">N/A</span>
|
|
50
|
+
</div>
|
|
51
|
+
<div class="kpi-pill" id="kpi-threads-pill" title="Open inline review threads">
|
|
52
|
+
<span class="kpi-label">Open Threads</span>
|
|
53
|
+
<span class="kpi-value" id="kpi-threads">0</span>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div class="mission-actions">
|
|
58
|
+
<div class="delta-control" id="delta-control">
|
|
59
|
+
<button type="button" class="btn btn-subtle" id="delta-toggle-btn" title="Toggle Round Delta filter (d)">
|
|
60
|
+
<span class="delta-dot"></span>
|
|
61
|
+
<span id="delta-toggle-label">All Changes</span>
|
|
62
|
+
</button>
|
|
63
|
+
<select id="delta-round-select" class="round-select hidden" aria-label="Compare since review round"></select>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div class="segmented" role="group" aria-label="Diff layout mode">
|
|
67
|
+
<button type="button" class="seg-btn active" id="mode-unified-btn" title="Unified diff (u)">Unified</button>
|
|
68
|
+
<button type="button" class="seg-btn" id="mode-split-btn" title="Split side-by-side diff (s)">Split</button>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<button type="button" class="btn btn-subtle" id="rescan-btn" title="Re-scan working tree (r)">
|
|
72
|
+
<svg viewBox="0 0 16 16" width="14" height="14" fill="currentColor" aria-hidden="true">
|
|
73
|
+
<path d="M1.705 8.005a.75.75 0 0 1 .834.656 5.5 5.5 0 0 0 9.592 2.97l-1.204-1.204a.25.25 0 0 1 .177-.427h3.646a.25.25 0 0 1 .25.25v3.646a.25.25 0 0 1-.427.177l-1.38-1.38A7.002 7.002 0 0 1 1.05 8.84a.75.75 0 0 1 .656-.834ZM8 2.5a5.487 5.487 0 0 0-4.131 1.869l1.204 1.204A.25.25 0 0 1 4.896 6H1.25A.25.25 0 0 1 1 5.75V2.104a.25.25 0 0 1 .427-.177l1.38 1.38A7.002 7.002 0 0 1 14.95 7.16a.75.75 0 0 1-1.49.178A5.5 5.5 0 0 0 8 2.5Z"/>
|
|
74
|
+
</svg>
|
|
75
|
+
<span>Re-scan</span>
|
|
76
|
+
</button>
|
|
77
|
+
|
|
78
|
+
<div class="export-group">
|
|
79
|
+
<button type="button" class="btn btn-primary" id="export-copy-btn" title="Copy Agent Repair Prompt (e)">
|
|
80
|
+
<svg viewBox="0 0 16 16" width="14" height="14" fill="currentColor" aria-hidden="true">
|
|
81
|
+
<path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"/>
|
|
82
|
+
<path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"/>
|
|
83
|
+
</svg>
|
|
84
|
+
<span>Copy Agent Repair Prompt</span>
|
|
85
|
+
</button>
|
|
86
|
+
<button type="button" class="btn btn-primary btn-icon-only" id="export-preview-btn" title="Preview repair prompt Markdown" aria-label="Preview repair prompt">
|
|
87
|
+
<svg viewBox="0 0 16 16" width="14" height="14" fill="currentColor" aria-hidden="true">
|
|
88
|
+
<path d="M8 2c1.981 0 3.671.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.62 1.62 0 0 1 0 1.798c-.45.678-1.367 1.932-2.637 3.023C11.67 13.008 9.981 14 8 14c-1.981 0-3.671-.992-4.933-2.078C1.797 10.831.88 9.577.43 8.899a1.62 1.62 0 0 1 0-1.798c.45-.678 1.367-1.932 2.637-3.023C4.33 2.992 6.019 2 8 2ZM1.679 7.932a.12.12 0 0 0 0 .136c.411.622 1.241 1.75 2.366 2.717C5.176 11.758 6.527 12.5 8 12.5c1.473 0 2.825-.742 3.955-1.715 1.124-.967 1.954-2.096 2.366-2.717a.12.12 0 0 0 0-.136c-.412-.621-1.242-1.75-2.366-2.717C10.824 4.242 9.473 3.5 8 3.5c-1.473 0-2.824.742-3.955 1.715-1.124.967-1.954 2.095-2.366 2.717ZM8 10a2 2 0 1 1-.001-3.999A2 2 0 0 1 8 10Z"/>
|
|
89
|
+
</svg>
|
|
90
|
+
</button>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
</header>
|
|
94
|
+
|
|
95
|
+
<!-- Main 3-Pane Workbench -->
|
|
96
|
+
<main class="workbench-grid">
|
|
97
|
+
<!-- Left Story Sidebar -->
|
|
98
|
+
<aside class="story-sidebar" aria-label="Review story navigation">
|
|
99
|
+
<div class="sidebar-header">
|
|
100
|
+
<div class="sidebar-title-row">
|
|
101
|
+
<span class="panel-heading">STORY ORDER</span>
|
|
102
|
+
<span class="round-pill" id="sidebar-round-pill">Round 1</span>
|
|
103
|
+
</div>
|
|
104
|
+
<div class="sidebar-search-wrap">
|
|
105
|
+
<input
|
|
106
|
+
type="text"
|
|
107
|
+
id="file-filter-input"
|
|
108
|
+
class="sidebar-search"
|
|
109
|
+
placeholder="Filter files..."
|
|
110
|
+
autocomplete="off"
|
|
111
|
+
spellcheck="false"
|
|
112
|
+
>
|
|
113
|
+
</div>
|
|
114
|
+
<div id="delta-banner" class="delta-banner hidden"></div>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="story-list" id="story-list"></div>
|
|
117
|
+
</aside>
|
|
118
|
+
|
|
119
|
+
<!-- Center Diff Workbench -->
|
|
120
|
+
<section class="diff-pane" id="diff-pane" aria-label="Diff viewer">
|
|
121
|
+
<div class="diff-content" id="diff-content">
|
|
122
|
+
<div class="empty-state">Loading repository analysis...</div>
|
|
123
|
+
</div>
|
|
124
|
+
</section>
|
|
125
|
+
|
|
126
|
+
<!-- Right Inspector Drawer -->
|
|
127
|
+
<aside class="inspector-drawer" aria-label="Blast radius and proof inspector">
|
|
128
|
+
<div class="inspector-section">
|
|
129
|
+
<div class="inspector-section-header">
|
|
130
|
+
<span class="panel-heading">BLAST RADIUS</span>
|
|
131
|
+
<div class="mini-segmented" role="group" aria-label="Blast radius scope">
|
|
132
|
+
<button type="button" class="mini-seg-btn active" id="br-scope-file">This File</button>
|
|
133
|
+
<button type="button" class="mini-seg-btn" id="br-scope-all">Entire Diff</button>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
<div class="inspector-body" id="blast-radius-body"></div>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<div class="inspector-section">
|
|
140
|
+
<div class="inspector-section-header">
|
|
141
|
+
<span class="panel-heading">PROOF SUMMARY</span>
|
|
142
|
+
</div>
|
|
143
|
+
<div class="inspector-body" id="proof-summary-body"></div>
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
<div class="inspector-section">
|
|
147
|
+
<div class="inspector-section-header">
|
|
148
|
+
<span class="panel-heading">REVIEW ROUNDS</span>
|
|
149
|
+
</div>
|
|
150
|
+
<div class="inspector-body" id="rounds-timeline-body"></div>
|
|
151
|
+
</div>
|
|
152
|
+
</aside>
|
|
153
|
+
</main>
|
|
154
|
+
|
|
155
|
+
<!-- Keyboard Shortcuts Footer -->
|
|
156
|
+
<footer class="shortcut-bar">
|
|
157
|
+
<div class="shortcut-list">
|
|
158
|
+
<span class="shortcut-item"><kbd>j</kbd>/<kbd>k</kbd> files</span>
|
|
159
|
+
<span class="shortcut-item"><kbd>u</kbd>/<kbd>s</kbd> unified / split</span>
|
|
160
|
+
<span class="shortcut-item"><kbd>d</kbd> round delta</span>
|
|
161
|
+
<span class="shortcut-item"><kbd>r</kbd> re-scan</span>
|
|
162
|
+
<span class="shortcut-item"><kbd>e</kbd> export repair prompt</span>
|
|
163
|
+
<span class="shortcut-item"><kbd>Click</kbd> symbol → impact</span>
|
|
164
|
+
<span class="shortcut-item"><kbd>Esc</kbd> close drawer / modal</span>
|
|
165
|
+
</div>
|
|
166
|
+
<div class="shortcut-legend">
|
|
167
|
+
<span class="legend-item"><span class="cov-swatch cov-hit"></span>Executed by tests</span>
|
|
168
|
+
<span class="legend-item"><span class="cov-swatch cov-miss"></span>Uncovered addition</span>
|
|
169
|
+
<span class="legend-item"><span class="proof-dot-inline dot-reached"></span>Statically reached</span>
|
|
170
|
+
</div>
|
|
171
|
+
</footer>
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
<!-- Export Repair Prompt Modal -->
|
|
175
|
+
<div id="export-modal" class="modal-backdrop hidden" role="dialog" aria-modal="true" aria-labelledby="export-modal-title">
|
|
176
|
+
<div class="modal-card">
|
|
177
|
+
<div class="modal-header">
|
|
178
|
+
<div>
|
|
179
|
+
<h2 id="export-modal-title" class="modal-title">Agent Repair Prompt</h2>
|
|
180
|
+
<p class="modal-subtitle">Paste directly into Claude Code, Codex, Cursor, or Antigravity to resolve findings.</p>
|
|
181
|
+
</div>
|
|
182
|
+
<button type="button" class="btn btn-subtle btn-sm" id="export-modal-close">Close</button>
|
|
183
|
+
</div>
|
|
184
|
+
<div class="modal-toolbar">
|
|
185
|
+
<label class="checkbox-label">
|
|
186
|
+
<input type="checkbox" id="export-include-hazards" checked>
|
|
187
|
+
<span>Include automated deterministic hazards</span>
|
|
188
|
+
</label>
|
|
189
|
+
<button type="button" class="btn btn-primary btn-sm" id="export-modal-copy">Copy Markdown</button>
|
|
190
|
+
</div>
|
|
191
|
+
<textarea id="export-markdown-box" class="export-textarea" readonly spellcheck="false"></textarea>
|
|
192
|
+
</div>
|
|
193
|
+
</div>
|
|
194
|
+
|
|
195
|
+
<!-- Symbol Impact Slide-Over Drawer -->
|
|
196
|
+
<div id="symbol-drawer-backdrop" class="drawer-backdrop hidden" role="dialog" aria-modal="true" aria-labelledby="symbol-drawer-title">
|
|
197
|
+
<div class="caller-drawer symbol-drawer">
|
|
198
|
+
<div class="caller-drawer-header">
|
|
199
|
+
<div class="caller-drawer-head-main">
|
|
200
|
+
<div class="caller-drawer-badges">
|
|
201
|
+
<span id="symbol-drawer-kind" class="pill pill-reached">function</span>
|
|
202
|
+
<span id="symbol-drawer-scope" class="pill pill-mono">repository</span>
|
|
203
|
+
<span id="symbol-drawer-ms" class="speed-badge">-- ms</span>
|
|
204
|
+
</div>
|
|
205
|
+
<h2 id="symbol-drawer-title" class="caller-drawer-title">symbol</h2>
|
|
206
|
+
<p id="symbol-drawer-subtitle" class="modal-subtitle"></p>
|
|
207
|
+
</div>
|
|
208
|
+
<button type="button" class="btn btn-subtle btn-sm" id="symbol-drawer-close">Close</button>
|
|
209
|
+
</div>
|
|
210
|
+
<div id="symbol-drawer-kpis" class="symbol-kpi-strip"></div>
|
|
211
|
+
<div id="symbol-drawer-body" class="symbol-drawer-body"></div>
|
|
212
|
+
</div>
|
|
213
|
+
</div>
|
|
214
|
+
|
|
215
|
+
<!-- Caller Context Preview Drawer -->
|
|
216
|
+
<div id="caller-drawer-backdrop" class="drawer-backdrop hidden" role="dialog" aria-modal="true" aria-labelledby="caller-drawer-title">
|
|
217
|
+
<div class="caller-drawer">
|
|
218
|
+
<div class="caller-drawer-header">
|
|
219
|
+
<div class="caller-drawer-head-main">
|
|
220
|
+
<div class="caller-drawer-badges">
|
|
221
|
+
<span id="caller-drawer-kind" class="sev-badge sev-badge-critical">UNTOUCHED CALLER</span>
|
|
222
|
+
<span id="caller-drawer-lang" class="pill pill-mono">python</span>
|
|
223
|
+
<span id="caller-drawer-symbol" class="pill pill-mono hidden"></span>
|
|
224
|
+
</div>
|
|
225
|
+
<h2 id="caller-drawer-title" class="caller-drawer-title">src/caller.py:1</h2>
|
|
226
|
+
<p id="caller-drawer-subtitle" class="modal-subtitle"></p>
|
|
227
|
+
</div>
|
|
228
|
+
<button type="button" class="btn btn-subtle btn-sm" id="caller-drawer-close">Close</button>
|
|
229
|
+
</div>
|
|
230
|
+
<div class="caller-drawer-toolbar">
|
|
231
|
+
<div class="caller-toolbar-left">
|
|
232
|
+
<div id="caller-view-toggle" class="mini-segmented hidden" role="group" aria-label="Preview mode">
|
|
233
|
+
<button type="button" class="mini-seg-btn active" id="caller-mode-diff">Diff Only</button>
|
|
234
|
+
<button type="button" class="mini-seg-btn" id="caller-mode-context">Full Context</button>
|
|
235
|
+
</div>
|
|
236
|
+
<button type="button" class="btn btn-subtle btn-sm" id="caller-expand-btn">Expand Context</button>
|
|
237
|
+
<button type="button" class="btn btn-subtle btn-sm" id="caller-comment-toggle-btn">+ Comment on Caller</button>
|
|
238
|
+
</div>
|
|
239
|
+
<div class="caller-toolbar-right">
|
|
240
|
+
<button type="button" class="btn btn-subtle btn-sm hidden" id="caller-jump-workbench-btn">Open in Diff</button>
|
|
241
|
+
<a id="caller-vscode-link" class="btn btn-primary btn-sm" href="#" title="Open file and line in VS Code">Open in VS Code</a>
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
<div id="caller-composer-wrap" class="caller-composer-wrap hidden">
|
|
245
|
+
<div class="composer-top">
|
|
246
|
+
<span class="composer-title" id="caller-composer-title">Add review comment on caller</span>
|
|
247
|
+
<select id="caller-composer-severity" class="composer-select" aria-label="Caller comment severity">
|
|
248
|
+
<option value="blocker">Blocker</option>
|
|
249
|
+
<option value="suggestion">Suggestion</option>
|
|
250
|
+
<option value="question">Question</option>
|
|
251
|
+
<option value="note">Note</option>
|
|
252
|
+
</select>
|
|
253
|
+
</div>
|
|
254
|
+
<textarea id="caller-composer-body" class="composer-textarea" placeholder="Describe how this caller should be updated to match the new signature..."></textarea>
|
|
255
|
+
<div class="composer-footer">
|
|
256
|
+
<span class="composer-hint">Saved to .git/blastdiff/ and included in Agent Repair Prompt</span>
|
|
257
|
+
<div class="composer-buttons">
|
|
258
|
+
<button type="button" class="btn btn-sm" id="caller-composer-cancel">Cancel</button>
|
|
259
|
+
<button type="button" class="btn btn-sm btn-primary" id="caller-composer-submit">Save Thread</button>
|
|
260
|
+
</div>
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
<div id="caller-drawer-body" class="caller-drawer-body"></div>
|
|
264
|
+
</div>
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
<!-- Toast Notification Container -->
|
|
268
|
+
<div id="toast-container" class="toast-container" aria-live="polite"></div>
|
|
269
|
+
|
|
270
|
+
<script src="/static/app.js?v=5"></script>
|
|
271
|
+
</body>
|
|
272
|
+
</html>
|