visualproof 0.4.4 → 0.5.0

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.
Files changed (48) hide show
  1. package/README.md +16 -7
  2. package/dist/assets/tips/tour-agent.webp +0 -0
  3. package/dist/assets/tips/tour-arrange.webp +0 -0
  4. package/dist/assets/tips/tour-artwork.webp +0 -0
  5. package/dist/assets/tips/tour-checks.webp +0 -0
  6. package/dist/assets/tips/tour-keys.webp +0 -0
  7. package/dist/assets/tips/tour-library.webp +0 -0
  8. package/dist/assets/tips/tour-project.webp +0 -0
  9. package/dist/assets/tips/tour-review.webp +0 -0
  10. package/dist/assets/tips/tour-share.webp +0 -0
  11. package/dist/assets/tips/tour-source.webp +0 -0
  12. package/dist/assets/tips/tour-target.webp +0 -0
  13. package/dist/assets/tips/tour-view.webp +0 -0
  14. package/dist/assets/tips/tour.json +117 -112
  15. package/dist/assets/tips/tour.webp +0 -0
  16. package/dist/server/access.js +3 -1
  17. package/dist/server/accesspage.js +130 -0
  18. package/dist/server/agent.js +6 -1
  19. package/dist/server/buildwatch.js +133 -0
  20. package/dist/server/deploy.js +844 -0
  21. package/dist/server/doctor.js +15 -3
  22. package/dist/server/film.js +1 -1
  23. package/dist/server/historyapi.js +100 -50
  24. package/dist/server/historythread.js +206 -0
  25. package/dist/server/hover.js +8 -0
  26. package/dist/server/live.js +187 -36
  27. package/dist/server/main.js +256 -30
  28. package/dist/server/review.js +27 -7
  29. package/dist/server/status.js +119 -46
  30. package/dist/server/usage.js +51 -0
  31. package/dist/shared/board.js +2 -1
  32. package/dist/shared/deploy.js +35 -0
  33. package/dist/shared/layout.js +297 -70
  34. package/dist/shared/libm.js +366 -0
  35. package/dist/shared/palette.js +1 -1
  36. package/dist/shared/separate.js +556 -32
  37. package/dist/web/bundle/app.js +1972 -826
  38. package/dist/web/bundle/edges.js +2 -1
  39. package/dist/web/bundle/layout.js +1026 -80
  40. package/dist/web/src/canvas.js +47 -34
  41. package/dist/web/src/overview.js +4 -1
  42. package/dist/web/src/scene.js +13 -12
  43. package/dist/web/src/status.js +28 -0
  44. package/dist/web/src/theme.js +108 -0
  45. package/dist/web/style.css +102 -35
  46. package/docs/agent-api/history.md +3 -0
  47. package/docs/agent-api/requests.md +4 -3
  48. package/package.json +1 -1
@@ -25,6 +25,19 @@
25
25
  it on screen after it was hidden) */
26
26
  [hidden] { display: none !important; }
27
27
 
28
+ /* reduced motion (the system's setting; web/src/theme.ts, reducedMotion, for what moves by itself):
29
+ nothing on the page slides, fades, pulses or spins — what changes is there at once, every
30
+ transition and animation over within a millisecond, so that whatever waits for one to end still
31
+ hears it. Where an animation says something, it says it still: a flash that shows where a line
32
+ is holds a moment (.rv-flash), the export's progress bar stands */
33
+ @media (prefers-reduced-motion: reduce) {
34
+ *, *::before, *::after {
35
+ transition-duration: 0s !important; transition-delay: 0s !important;
36
+ animation-duration: 1ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
37
+ scroll-behavior: auto !important;
38
+ }
39
+ }
40
+
28
41
  :root {
29
42
  /* the camera's easing (web/src/canvas.ts, animate), for what moves with it */
30
43
  --art-ease: cubic-bezier(0.65, 0, 0.35, 1);
@@ -35,9 +48,12 @@
35
48
  --surface: rgba(255, 255, 255, 0.78);
36
49
  --surface-solid: #ffffff;
37
50
  --line: rgba(0, 0, 0, 0.08);
51
+ /* the text, at least 4.5:1 on every surface it is written on (WCAG AA; the owner's QA of 0.4.4
52
+ found the third at 2.5:1, #a1a1a6): the second 5.8:1 on the ground and 6.4:1 on a solid
53
+ surface, the third 4.5:1 and 4.9:1, a step apart (L* 40 and 47; #6e6e73 the second before) */
38
54
  --text: #1d1d1f;
39
- --text-2: #6e6e73;
40
- --text-3: #a1a1a6;
55
+ --text-2: #5f5f64;
56
+ --text-3: #707075;
41
57
  --disc: rgba(0, 0, 0, 0.022);
42
58
  --disc-line: rgba(0, 0, 0, 0.07);
43
59
  --label: rgba(29, 29, 31, 0.55);
@@ -49,13 +65,20 @@
49
65
  --grad-tcb: linear-gradient(100deg, #5e5ce6, #bf5af2);
50
66
  --grad-dep: linear-gradient(100deg, #0a84ff, #64d2ff);
51
67
  --grad-app: linear-gradient(100deg, #ff9f0a, #ff375f);
52
- --accent: #7d5cf0;
68
+ /* the accent, also the colour of links and of what is lit: 4.5:1 on the ground (#7d5cf0 before,
69
+ 4.1:1) */
70
+ --accent: #7655e9;
53
71
  /* the mark of someone invited by a personal link (CollabSpec decision 9): the accent, apart from
54
72
  every colour of the review's status */
55
73
  --verified: #6a4be0;
56
- /* an edge runs from the declaration that uses (from) to the one it uses (to) */
74
+ /* an edge runs from the declaration that uses (from) to the one it uses (to); the overview's
75
+ edges take only their hue, at opacities of their own (web/src/overview.ts, looksOf) */
57
76
  --edge-from: rgba(240, 110, 20, 0.85);
58
77
  --edge-to: rgba(59, 91, 219, 0.85);
78
+ /* how much fainter each edge is drawn as more are drawn at once, beyond what the board does in
79
+ every theme (web/src/canvas.ts, crowdFade): none on the light ground, where edges that cross
80
+ add up to ink */
81
+ --edge-crowd: 0;
59
82
 
60
83
  --k-def: #0a84ff;
61
84
  --k-abbrev: #40c8e0;
@@ -72,8 +95,11 @@
72
95
 
73
96
  /* the Status scheme (decided 2026-10-08, CanvasSpec "Colour schemes"): one colour per point, the
74
97
  most urgent state winning; Okabe and Ito's palette, which colour-blind readers tell apart, the
75
- quiet states set apart by lightness and hue (not yet reviewed a light grey, trusted a pale
76
- green, failed a dark grey; 2026-10-09). Commented is a calm
98
+ quiet states set apart by lightness and hue (not yet reviewed a mid grey, trusted a pale green,
99
+ failed a dark grey; 2026-10-09). Not yet reviewed was a light grey (#c7c7cc), too close to the
100
+ clusters' discs and lines to read as a point (the owner's report of 2026-10-18): a mid grey now,
101
+ L* 67, far from failed's L* 33 and from the clusters' lines, and a little warm — a neutral grey
102
+ that dark is, to a deuteranope, sorry's reddish purple (ΔE2000 3.9; 10.5 warm). Commented is a calm
77
103
  cobalt blue (2026-10-09), darker than building's sky blue and bluer than sorry's purple, so
78
104
  that it stays apart from both, and from failed's grey, for every kind of colour blindness */
79
105
  --status-failed: #4d4d52;
@@ -82,7 +108,7 @@
82
108
  --status-commented: #2a62c0;
83
109
  --status-stale: #e69f00;
84
110
  --status-approved: #009e73;
85
- --status-unreviewed: #c7c7cc;
111
+ --status-unreviewed: #a6a29c;
86
112
  --status-trusted: #b3e2c2;
87
113
 
88
114
  --st-failed: #ff3b30;
@@ -146,44 +172,70 @@
146
172
  --tm-renamed: #0f97ab;
147
173
  }
148
174
 
149
- /* dark: chosen, or following the system (web/src/theme.ts sets data-theme before the first paint) */
175
+ /* dark: chosen, or following the system (web/src/theme.ts sets data-theme before the first paint).
176
+ Midnight (the owner's decision of 2026-10-18, chosen against a graphite and the neutral black
177
+ #0b0b0d before it): a blue-black ground, its surfaces, lines and discs tinted the same blue, its
178
+ text a cool white. Every colour the dark theme changes is in this one block; what it leaves out
179
+ is the light theme's. The artwork command reads the same two blocks (web/src/artwork.ts,
180
+ cssTheme), so a selector of its own here would be missed there. */
150
181
  :root { color-scheme: light; }
151
182
  :root[data-theme="dark"] {
152
183
  color-scheme: dark;
184
+ /* the ground, the surfaces over it, and the text on them */
185
+ --canvas: #0d1017;
186
+ --surface: rgba(23, 27, 37, 0.84);
187
+ --surface-solid: #181c26;
188
+ --line: rgba(170, 185, 255, 0.11);
189
+ /* the text at least 4.5:1 wherever it is written, a code block's tint included (the third 4.5:1
190
+ there, 5.1:1 on a solid surface; #6e6e73 before, 3.4:1); the accent 6.2:1 (it had no dark value,
191
+ 3.8:1) */
192
+ --text: #eef0f6;
193
+ --text-2: #a4a9ba;
194
+ --text-3: #878d9f;
195
+ --accent: #a08cff;
153
196
  --verified: #ab97ff;
154
- --canvas: #0b0b0d;
155
- --surface: rgba(28, 28, 30, 0.78);
156
- --surface-solid: #1c1c1e;
157
- --line: rgba(255, 255, 255, 0.09);
158
- --text: #f5f5f7;
159
- --text-2: #a1a1a6;
160
- --text-3: #6e6e73;
161
- --disc: rgba(255, 255, 255, 0.025);
162
- --disc-line: rgba(255, 255, 255, 0.08);
163
- --label: rgba(245, 245, 247, 0.5);
164
197
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 28px rgba(0, 0, 0, 0.45);
165
198
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 22px 60px rgba(0, 0, 0, 0.6);
166
- --code-bg: rgba(255, 255, 255, 0.05);
167
- --edge-from: rgba(255, 169, 77, 0.7);
168
- --edge-to: rgba(116, 143, 252, 0.7);
199
+ --code-bg: rgba(160, 178, 255, 0.07);
200
+ /* the board: the clusters' discs and lines, the names, the edges */
201
+ --disc: rgba(150, 170, 255, 0.045);
202
+ --disc-line: rgba(160, 178, 255, 0.15);
203
+ --label: rgba(226, 231, 246, 0.62);
204
+ /* the edges: on the dark ground the edges that cross add up to light, a dense bundle of orange
205
+ and blue a pink-white haze. Their ends are deeper and more saturated than the light theme's,
206
+ so that where many cross they mix into a colour rather than into white, and they step back as
207
+ they grow many: (from / n)^0.6 past a hundred of a selection's, past the overview's 400 */
208
+ --edge-from: rgba(255, 116, 38, 0.55);
209
+ --edge-to: rgba(90, 112, 255, 0.62);
210
+ --edge-crowd: 0.6;
169
211
  --target-star-edge: rgba(0, 0, 0, 0.55);
212
+ --k-theorem: #8b7fd0;
213
+ --k-notation: #b89b74;
214
+ --k-external: #5f6578;
215
+ /* the Status scheme's quiet states, the other way round from the light theme's (the owner's
216
+ decision of 2026-10-18): the quieter a state, the closer to the ground — trusted a dim green,
217
+ not yet reviewed a mid grey, failed the brightest, near white, as the light theme's failed is
218
+ its darkest. Not yet reviewed is L* 47, between trusted's 39 and the states that ask for a
219
+ look: at the L* 60 first tried it was, to a deuteranope, sorry's reddish purple (ΔE2000 3.6;
220
+ 15.4 here, and no two states under 10.7 under any of the three simulations). Commented's blue
221
+ is a step lighter than the light theme's, so that it stands out of a dark cluster as the other
222
+ states do, and still darker than building's sky blue */
223
+ --status-failed: #e9ecf5;
224
+ --status-commented: #4a84e8;
225
+ --status-unreviewed: #6c6f7a;
226
+ --status-trusted: #35664f;
227
+ /* the review, the banners, the code, a past graph's marks, the notes' dots */
228
+ /* commented's blue and what goes wrong, written as text (a count, an error): 4.7:1 and 5.0:1 on a
229
+ surface (3.8:1 and 4.3:1 as the light theme has them); the Comment button over it still takes
230
+ its white text at 4.5:1 */
231
+ --rv-commented: #5085e0;
232
+ --bad: #ec5a5f;
170
233
  --rv-trusted: #7f9cbf;
171
234
  --rv-advice-approve: rgba(80, 200, 130, 0.55);
172
235
  --rv-advice-comment: #8aaef0;
173
- --k-theorem: #8b7fd0;
174
- --k-notation: #b89b74;
175
236
  --banner-bad: #ff7b72;
176
237
  --banner-warn: #ffc56b;
177
238
  --banner-info: #7ab8ff;
178
- --k-external: #636366;
179
- /* on the dark canvas the failed grey is lighter, so that it still shows, and the very light green
180
- of trusted lighter still; not yet reviewed is a dim grey, darker than failed's, so that the two
181
- greys never meet in lightness. Commented's blue is a step lighter too, so that it stands out of a dark cluster as
182
- the other states do, and still darker than building's sky blue */
183
- --status-failed: #77777c;
184
- --status-commented: #3570d0;
185
- --status-unreviewed: #4c4c52;
186
- --status-trusted: rgba(170, 222, 187, 0.82);
187
239
  --tk-keyword: #ff7ab2;
188
240
  --tk-type: #6bdfff;
189
241
  --tk-comment: #7f8c98;
@@ -398,7 +450,7 @@ body.art-moving :is(#bar .brand, #bar .library-wrap, #export-btn, #activity-btn,
398
450
  /* a quoted opinion gone to, and quoted lines opened: flashed in the accent, then as they were */
399
451
  @keyframes vp-flash { from { background-color: color-mix(in srgb, var(--accent) 24%, transparent); } to { background-color: transparent; } }
400
452
  .rv-flash, .sw-win .ln.ln-flash { animation: vp-flash 2.4s ease-out; border-radius: 6px; }
401
- @media (prefers-reduced-motion: reduce) { .rv-flash, .sw-win .ln.ln-flash { animation-duration: 4s; animation-timing-function: steps(1, end); } }
453
+ @media (prefers-reduced-motion: reduce) { .rv-flash, .sw-win .ln.ln-flash { animation-duration: 4s !important; animation-timing-function: steps(1, end); } }
402
454
  /* what changed since a stale opinion: under it, unfaded, removed lines red and added lines green
403
455
  in both themes (a tint of the review colours over the surface, the marks mixed with the text) */
404
456
  .rv-changes { margin: -2px 0 2px 14px; font-size: 12px; }
@@ -957,6 +1009,7 @@ button.o-trust:hover { color: var(--accent); background: var(--code-bg); }
957
1009
  .ex-bar { position: relative; flex: 0 0 120px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
958
1010
  .ex-bar i { position: absolute; inset: 0 auto 0 0; width: 40%; border-radius: 2px; background: var(--accent); animation: ex-slide 1.1s ease-in-out infinite; }
959
1011
  @keyframes ex-slide { from { left: -40%; } to { left: 100%; } }
1012
+ @media (prefers-reduced-motion: reduce) { .ex-bar i { animation: none !important; left: 0; width: 100%; opacity: 0.45; } }
960
1013
  .ex-done { font-size: 12.5px; display: flex; flex-direction: column; gap: 8px; }
961
1014
  .ex-dl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
962
1015
  .ex-dl a.rv-btn { text-decoration: none; }
@@ -1441,8 +1494,19 @@ details.lf-archived > summary { cursor: pointer; }
1441
1494
  .bp-when { min-width: 104px; white-space: nowrap; font-variant-numeric: tabular-nums; }
1442
1495
  .bp-notes { margin-left: auto; color: var(--text-3); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1443
1496
  /* the history above, the graph on show and its files below */
1444
- .bp-build + .pop-h, .bp-btns + .pop-h { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
1497
+ .bp-build + .pop-h, .bp-btns + .pop-h, .bp-deploy + .pop-h { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
1445
1498
  .pop-ok { padding: 4px; }
1499
+ /* a branch the server follows and builds (DeploySpec): under the head, its builds */
1500
+ .bp-deploy { margin: 0 4px 10px; font-size: 12px; line-height: 1.45; }
1501
+ .bp-deploy .mono { font: 11.5px var(--mono); }
1502
+ .bp-deploy a { color: var(--accent); text-decoration: none; }
1503
+ .bp-deploy a:hover { text-decoration: underline; }
1504
+ .bp-follow, .bp-next, .bp-last { color: var(--text-2); margin: 0 0 8px; }
1505
+ .bp-deploy .banner { margin: 0 0 8px; }
1506
+ .bp-log {
1507
+ margin: 0 0 8px; max-height: 14em; overflow: auto; padding: 8px 10px; border-radius: 8px; background: var(--code-bg);
1508
+ font: 10.5px/1.45 var(--mono); color: var(--text-2); white-space: pre-wrap; word-break: break-word;
1509
+ }
1446
1510
  .pf {
1447
1511
  display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; text-align: left;
1448
1512
  padding: 4px 6px; border-radius: 7px; font-size: 12px;
@@ -2064,7 +2128,7 @@ kbd {
2064
2128
  .film-stage { outline: none; border-radius: 12px; }
2065
2129
  .film-stage:focus-visible { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent); }
2066
2130
  .film-frame { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: #f5f5f7; border: 1px solid var(--line); box-shadow: var(--shadow); }
2067
- :root[data-theme="dark"] .film-frame { border: 6px solid #2c2c2e; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
2131
+ :root[data-theme="dark"] .film-frame { border: 6px solid #262b38; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
2068
2132
  :root[data-theme="dark"] .film-video, :root[data-theme="dark"] .film-still { filter: brightness(0.92); }
2069
2133
  .film-video, .film-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
2070
2134
  /* the controls over the film: play, captions, larger — light, as the film is */
@@ -2328,6 +2392,9 @@ kbd {
2328
2392
  .sk-att-cap { display: block; padding: 2px 7px 3px; font-size: 11px; color: var(--note-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-top: 1px solid var(--note-edge); }
2329
2393
  .sk-att-pdf { display: flex; align-items: flex-start; gap: 8px; padding: 5px; }
2330
2394
  .sk-att-page { flex: none; width: 64px; height: auto; max-height: 96px; object-fit: contain; object-position: top; background: #fff; box-shadow: 0 0 0 1px var(--note-edge); border-radius: 2px; }
2395
+ /* a PDF's white page, whole or clipped, glares in a dark note: dimmed a little, never inverted (a
2396
+ page is read as it is printed); an image as it is */
2397
+ :root[data-theme="dark"] .sk-att-page, :root[data-theme="dark"] .sk-att-clip .sk-att-pic { filter: brightness(0.82); }
2331
2398
  .sk-att-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
2332
2399
  .sk-att-title { font-weight: 600; font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
2333
2400
  .sk-att-meta { font-size: 11px; color: var(--note-mute); }
@@ -59,6 +59,9 @@ build, not gone). `bytes`: `new` written to keep it, `all` its files. `renames`:
59
59
  build before, per confidence. `sources`: texts kept (`kept` of `of` modules with a file; `places` of
60
60
  them matched by recorded places, not Lake hash; gzipped `bytes` first kept for it and of all it
61
61
  lists); absent until backfilled at server start.
62
+ `following`, where the server follows a branch it builds (`serve <git URL>`): `{branch, source,
63
+ github, every, asked, building: {commit, step, tail}, next, last: {commit, ok, ms, exit?, error?,
64
+ retry?, tail}, built}` — `next` the only commit built after the build going on.
62
65
 
63
66
  ## `GET /api/agent/history/graph?id=&part=`
64
67
 
@@ -12,9 +12,10 @@ that describe the API itself. The rules are in the [index](README.md).
12
12
  - **A server that lets in only those given its link** (`--access-key-file`) answers 404 to
13
13
  everything, `/api/agent` included, unless the request carries `Authorization: Bearer <key>` (the
14
14
  key is the last part of the link you were given, `…/k/<key>`) or an agent token of its own,
15
- `Authorization: Bearer vpa_…`. **A server without a key** answers only its IP addresses,
16
- `localhost` and the names it was given (`--public-url`, `--allowed-host`): another name is 403,
17
- in plain text — use the address your prompt gives.
15
+ `Authorization: Bearer vpa_…` (to a browser's page, 403 and a page saying the site is private).
16
+ **A server without a key** answers only its IP addresses, `localhost` and the names it was given
17
+ (`--public-url`, `--allowed-host`): another name is 403, in plain text — use the address your
18
+ prompt gives.
18
19
  - Every answer is JSON — but the documentation, the MCP server's file and install text, and the
19
20
  files you download. **Every error
20
21
  is `{error, hint}`**: what went wrong and what to do. A name that does not exist answers 404 with
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "visualproof",
3
- "version": "0.4.4",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "description": "See a Lean codebase's declaration graph and the TCB of its theorems.",
6
6
  "license": "Apache-2.0",