visualproof 0.4.3 → 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 (82) hide show
  1. package/README.md +16 -7
  2. package/dist/assets/latex/visualproof.sty +19 -9
  3. package/dist/assets/tips/tour-agent.webp +0 -0
  4. package/dist/assets/tips/tour-arrange.webp +0 -0
  5. package/dist/assets/tips/tour-artwork.webp +0 -0
  6. package/dist/assets/tips/tour-checks.webp +0 -0
  7. package/dist/assets/tips/tour-keys.webp +0 -0
  8. package/dist/assets/tips/tour-library.webp +0 -0
  9. package/dist/assets/tips/tour-project.webp +0 -0
  10. package/dist/assets/tips/tour-review.webp +0 -0
  11. package/dist/assets/tips/tour-share.webp +0 -0
  12. package/dist/assets/tips/tour-source.webp +0 -0
  13. package/dist/assets/tips/tour-target.webp +0 -0
  14. package/dist/assets/tips/tour-view.webp +0 -0
  15. package/dist/assets/tips/tour.json +117 -112
  16. package/dist/assets/tips/tour.webp +0 -0
  17. package/dist/mcp/visualproof-mcp.mjs +7 -3
  18. package/dist/server/access.js +37 -1
  19. package/dist/server/accesspage.js +130 -0
  20. package/dist/server/agent.js +11 -5
  21. package/dist/server/agentlibrary.js +1 -1
  22. package/dist/server/agentviews.js +1 -1
  23. package/dist/server/artcmd.js +1 -1
  24. package/dist/server/askfollow.js +1 -4
  25. package/dist/server/buildwatch.js +133 -0
  26. package/dist/server/deploy.js +844 -0
  27. package/dist/server/doctor.js +15 -3
  28. package/dist/server/events.js +20 -5
  29. package/dist/server/export.js +17 -4
  30. package/dist/server/fetchurl.js +30 -13
  31. package/dist/server/film.js +1 -1
  32. package/dist/server/history.js +3 -1
  33. package/dist/server/historyapi.js +100 -50
  34. package/dist/server/historythread.js +206 -0
  35. package/dist/server/hover.js +8 -0
  36. package/dist/server/identity.js +25 -1
  37. package/dist/server/library.js +10 -3
  38. package/dist/server/live.js +206 -28
  39. package/dist/server/lostfound.js +3 -2
  40. package/dist/server/main.js +361 -50
  41. package/dist/server/poppler.js +48 -10
  42. package/dist/server/renames.js +10 -5
  43. package/dist/server/review.js +32 -2
  44. package/dist/server/reviewapi.js +1 -1
  45. package/dist/server/status.js +144 -50
  46. package/dist/server/talk.js +7 -2
  47. package/dist/server/usage.js +51 -0
  48. package/dist/server/views.js +21 -7
  49. package/dist/shared/board.js +2 -1
  50. package/dist/shared/collab.js +14 -8
  51. package/dist/shared/deploy.js +35 -0
  52. package/dist/shared/doc/latex.js +5 -3
  53. package/dist/shared/doc/outline.js +6 -3
  54. package/dist/shared/layout.js +297 -70
  55. package/dist/shared/libm.js +366 -0
  56. package/dist/shared/library.js +11 -6
  57. package/dist/shared/palette.js +1 -1
  58. package/dist/shared/review.js +7 -5
  59. package/dist/shared/search.js +7 -3
  60. package/dist/shared/separate.js +556 -32
  61. package/dist/shared/views.js +8 -1
  62. package/dist/web/bundle/app.js +3595 -1520
  63. package/dist/web/bundle/edges.js +44 -16
  64. package/dist/web/bundle/layout.js +1026 -80
  65. package/dist/web/index.html +2 -2
  66. package/dist/web/src/artwork.js +25 -4
  67. package/dist/web/src/axiomring.js +42 -0
  68. package/dist/web/src/bundles.js +52 -16
  69. package/dist/web/src/canvas.js +109 -54
  70. package/dist/web/src/overview.js +4 -1
  71. package/dist/web/src/past.js +28 -0
  72. package/dist/web/src/scene.js +13 -12
  73. package/dist/web/src/selection.js +47 -4
  74. package/dist/web/src/status.js +32 -2
  75. package/dist/web/src/theme.js +108 -0
  76. package/dist/web/style.css +181 -45
  77. package/docs/agent-api/following.md +1 -1
  78. package/docs/agent-api/history.md +3 -0
  79. package/docs/agent-api/library.md +1 -1
  80. package/docs/agent-api/requests.md +4 -1
  81. package/docs/agent-api/views.md +1 -1
  82. 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; }
@@ -1383,7 +1436,9 @@ details.lf-archived > summary { cursor: pointer; }
1383
1436
  .p-also .avatar { width: 20px; height: 20px; font-size: 9px; }
1384
1437
  .modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
1385
1438
  .rv-btn.primary { background: var(--accent); border-color: var(--accent); color: white; }
1386
- .rv-btn.primary:hover { color: white; filter: brightness(1.08); }
1439
+ .rv-btn.primary:hover:not(:disabled) { color: white; filter: brightness(1.08); }
1440
+ /* one that cannot be used looks it, as the others do (above): faded, never grey on its colour */
1441
+ .rv-btn.primary:disabled { color: white; opacity: 0.45; }
1387
1442
  .tk-ref:hover { text-decoration: underline; background: var(--code-bg); }
1388
1443
  .brand .logo { font-size: 17px; }
1389
1444
  .project { color: var(--text-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@@ -1439,8 +1494,19 @@ details.lf-archived > summary { cursor: pointer; }
1439
1494
  .bp-when { min-width: 104px; white-space: nowrap; font-variant-numeric: tabular-nums; }
1440
1495
  .bp-notes { margin-left: auto; color: var(--text-3); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1441
1496
  /* the history above, the graph on show and its files below */
1442
- .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); }
1443
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
+ }
1444
1510
  .pf {
1445
1511
  display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; text-align: left;
1446
1512
  padding: 4px 6px; border-radius: 7px; font-size: 12px;
@@ -1512,7 +1578,8 @@ details.lf-archived > summary { cursor: pointer; }
1512
1578
  /* something said for a moment (a shift-click that changed nothing): read, then gone */
1513
1579
  /* something said for a moment is read above the floating windows too: it answers what was just done */
1514
1580
  .hint.say { color: var(--text); padding: 3px 10px; border-radius: 8px; background: var(--surface-solid); box-shadow: var(--shadow); z-index: 36; }
1515
- .hint.say.below { top: 156px; }
1581
+ /* under the review strip and the note of a kept view (--strip-h: main.ts) */
1582
+ .hint.say.below { top: calc(118px + var(--strip-h, 38px)); }
1516
1583
 
1517
1584
  /* the selection (web/src/selbar.ts): under the modes, heading the panel's column */
1518
1585
  #selbar {
@@ -1776,7 +1843,9 @@ details.lf-archived > summary { cursor: pointer; }
1776
1843
  .o-row.on { background: color-mix(in srgb, var(--accent) 11%, transparent); box-shadow: inset 2px 0 0 var(--accent); }
1777
1844
  .o-row.on .o-label { color: var(--accent); font-weight: 600; }
1778
1845
  .o-row .tw { width: 12px; color: var(--text-3); font-size: 10px; flex: none; text-align: center; }
1779
- .o-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1846
+ /* the arrow and the name are buttons (the keyboard's too), drawn as the row's text */
1847
+ .o-row button.tw, .o-row button.o-label { border: 0; background: none; padding: 0; height: 100%; }
1848
+ .o-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
1780
1849
  .o-count { color: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
1781
1850
  .o-row .fold { border: 0; background: transparent; color: var(--text-2); width: 20px; padding: 0; font-size: 10px; }
1782
1851
  .o-row .fold:hover { color: var(--accent); }
@@ -1942,6 +2011,14 @@ a.link:hover { text-decoration: underline; }
1942
2011
  .s-trusted { --s: var(--status-trusted); }
1943
2012
  .dot.ss, .card.ss .dot { background: var(--s); box-shadow: none; }
1944
2013
  .dot.ss.k-external, .card.ss.k-external .dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--s); }
2014
+ /* an axiom is a ring (CanvasSpec, "Colour schemes and the legend", the owner's decision of
2015
+ 2026-10-18; web/src/axiomring.ts): its dot ringed in its own colour a gap apart, as its point on
2016
+ the canvas is, in either scheme — in the legend, the panel, a card, the search, the hover */
2017
+ .dot.k-axiom, .k-axiom .dot, .dot.axiom, .axiom .dot { outline: 1.5px solid var(--ring, var(--k-axiom)); outline-offset: 1.5px; }
2018
+ .dot.k-external.axiom, .k-external .dot.axiom, .k-external.axiom .dot { --ring: var(--k-external); }
2019
+ .dot.ss.axiom, .ss.axiom .dot, .ss.k-axiom .dot { --ring: var(--s); }
2020
+ /* the legend's line for it, by status: a ring round a dot of no state's colour */
2021
+ .lg-ring .dot { background: var(--text-2); --ring: var(--text-2); width: 8px; height: 8px; margin: 0 3px; }
1945
2022
  .cluster-card .dot { background: var(--grad); }
1946
2023
 
1947
2024
  /* the guide (CollabSpec, G1): the first-visit tour, and the sheet of keys */
@@ -2051,7 +2128,7 @@ kbd {
2051
2128
  .film-stage { outline: none; border-radius: 12px; }
2052
2129
  .film-stage:focus-visible { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent); }
2053
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); }
2054
- :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); }
2055
2132
  :root[data-theme="dark"] .film-video, :root[data-theme="dark"] .film-still { filter: brightness(0.92); }
2056
2133
  .film-video, .film-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
2057
2134
  /* the controls over the film: play, captions, larger — light, as the film is */
@@ -2315,6 +2392,9 @@ kbd {
2315
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); }
2316
2393
  .sk-att-pdf { display: flex; align-items: flex-start; gap: 8px; padding: 5px; }
2317
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); }
2318
2398
  .sk-att-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
2319
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; }
2320
2400
  .sk-att-meta { font-size: 11px; color: var(--note-mute); }
@@ -2532,6 +2612,7 @@ body.tm #tabs, body.tm .views-wrap, body.tm .vb-gap, body.tm .light-l { display:
2532
2612
  #tmbar.busy .tm-mark.aim { fill: var(--surface-solid); stroke: var(--accent); stroke-width: 1.4; }
2533
2613
  .tm-wait:not(.tm-failed) { display: none; }
2534
2614
  #tmbar.busy .tm-wait { display: inline; }
2615
+ #tabs.busy .tab-wait { display: inline-flex; gap: 0; padding: 0 12px; color: var(--text-3); cursor: default; }
2535
2616
  .tm-wait.tm-failed { color: var(--tm-gone); font-style: normal; }
2536
2617
  .tm-spin { display: inline-block; width: 9px; height: 9px; margin-right: 4px; vertical-align: -1px; box-sizing: border-box; border: 1.5px solid color-mix(in srgb, var(--accent) 28%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: tm-spin 900ms linear infinite; }
2537
2618
  @keyframes tm-spin { to { transform: rotate(360deg); } }
@@ -2539,6 +2620,8 @@ body.tm #tabs, body.tm .views-wrap, body.tm .vb-gap, body.tm .light-l { display:
2539
2620
  .tm-when { flex: none; font-size: 12px; white-space: nowrap; color: var(--text); }
2540
2621
  .tm-when .mono { font: 11.5px var(--mono); color: var(--text-2); }
2541
2622
  .tm-latest { font-size: 10.5px; padding: 1px 6px; border-radius: 6px; background: var(--code-bg); color: var(--text-2); }
2623
+ /* a build that could not read some files (web/src/past.ts, unreadWords) */
2624
+ .tm-unread { flex: none; font-size: 10.5px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 159, 10, 0.13); color: var(--banner-warn); }
2542
2625
  .tm-wait { color: var(--text-3); font-style: italic; }
2543
2626
  .tm-sum { flex: 0 1 auto; display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; font-size: 12px; white-space: nowrap; }
2544
2627
  .tm-n {
@@ -2581,9 +2664,10 @@ button.tm-row:hover { background: var(--code-bg); }
2581
2664
  /* what was added since: a name, not a place on this build's board */
2582
2665
  span.tm-row { color: var(--text-2); cursor: default; }
2583
2666
  .tm-more { padding: 6px; font-size: 11.5px; }
2584
- /* a view kept at a past build (HistorySpec decision 19): said where the review strip goes */
2667
+ /* a view kept at a past build (HistorySpec decision 19): said where the review strip goes, under it
2668
+ where both show (a kept view focused on a target; --lens-h: main.ts) */
2585
2669
  #tm-kept {
2586
- position: fixed; top: 110px; left: calc((100vw + var(--inset-left, 0px) - var(--inset-right, 0px)) / 2); transform: translateX(-50%); z-index: 15;
2670
+ position: fixed; top: calc(110px + var(--lens-h, 0px)); left: calc((100vw + var(--inset-left, 0px) - var(--inset-right, 0px)) / 2); transform: translateX(-50%); z-index: 15;
2587
2671
  display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border-radius: 12px; font-size: 12.5px;
2588
2672
  max-width: calc(100vw - var(--inset-left, 0px) - var(--inset-right, 0px) - 16px); white-space: nowrap;
2589
2673
  }
@@ -2679,6 +2763,7 @@ span.tm-row { color: var(--text-2); cursor: default; }
2679
2763
  #foot { left: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); }
2680
2764
  /* under the view bar, the review strip, then the selection bar (--strip-h: main.ts) */
2681
2765
  #lensbar, #tm-kept { top: 100px; left: 8px; right: 8px; transform: none; max-width: none; }
2766
+ #tm-kept { top: calc(100px + var(--lens-h, 0px)); }
2682
2767
  #selbar { top: calc(100px + var(--strip-h, 0px)); left: 8px; right: 8px; width: auto; }
2683
2768
  /* the panel: a sheet from the bottom, its height the reader's to drag */
2684
2769
  #panel {
@@ -2733,7 +2818,7 @@ span.tm-row { color: var(--text-2); cursor: default; }
2733
2818
 
2734
2819
  What the two shapes whose panel is a sheet share (web/src/phone.ts, SHEETED): the side panel is a
2735
2820
  drawer from ☰, at the left of the view bar, and ⚙ Board and Trusted take its place. */
2736
- @media (max-width: 640px), (max-aspect-ratio: 5/6) {
2821
+ @media (max-width: 640px), (min-width: 641px) and (max-aspect-ratio: 5/6) and (pointer: coarse), (min-width: 641px) and (max-width: 999px) and (max-aspect-ratio: 5/6) {
2737
2822
  .side-btn { display: inline-flex; flex: none; width: 36px; justify-content: center; padding: 0; }
2738
2823
  /* the side panel: a drawer from the left, over a shade */
2739
2824
  body.side-open #side { display: flex; position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); border-radius: 0 16px 16px 0; z-index: 47; padding-top: env(safe-area-inset-top); background: var(--surface-solid); }
@@ -2753,13 +2838,14 @@ span.tm-row { color: var(--text-2); cursor: default; }
2753
2838
 
2754
2839
  /* ---------------------------------------------------------------- a tall screen (PhoneSpec, "Tall screens")
2755
2840
 
2756
- Wider than a phone and upright: a tablet held upright, a narrow window, a monitor on its side. A
2757
- larger screen's page, placed for the shape: the side panel is the drawer (above), the panel a sheet
2841
+ Wider than a phone and upright, under a finger or narrower than 1000 px: a tablet held upright, a
2842
+ narrow window (an upright monitor with a mouse is not one: below). A larger screen's page, placed
2843
+ for the shape: the side panel is the drawer (above), the panel a sheet
2758
2844
  from the bottom across the screen, and what takes the panel's place on a larger screen —
2759
2845
  Activity, the lost-and-found, Export's window — takes the sheet's; the floating windows dock there
2760
2846
  too. The review strip, then the selection bar, go across under the view bar; the legend and the
2761
2847
  zoom's box keep to the board's room, above the sheet (--room-bottom: web/src/phone.ts). */
2762
- @media (min-width: 641px) and (max-aspect-ratio: 5/6) {
2848
+ @media (min-width: 641px) and (max-aspect-ratio: 5/6) and (pointer: coarse), (min-width: 641px) and (max-width: 999px) and (max-aspect-ratio: 5/6) {
2763
2849
  /* the tallest the sheet and the dock go: under the view bar, the review strip and the selection
2764
2850
  bar (--strip-h, --selbar-h: main.ts) */
2765
2851
  body { --sheet-most: calc(100dvh - 120px - var(--strip-h, 0px) - var(--selbar-h, 0px)); }
@@ -2813,6 +2899,7 @@ span.tm-row { color: var(--text-2); cursor: default; }
2813
2899
  /* under the view bar, across the screen: the review strip, then the selection bar (--strip-h:
2814
2900
  main.ts) */
2815
2901
  #lensbar, #tm-kept { top: 108px; left: 12px; right: 12px; transform: none; max-width: none; }
2902
+ #tm-kept { top: calc(108px + var(--lens-h, 0px)); }
2816
2903
  #selbar { top: calc(108px + var(--strip-h, 0px)); left: 12px; right: 12px; width: auto; }
2817
2904
  /* the legend and the zoom's box at the foot of the board's room, above the sheet or the dock */
2818
2905
  #foot { left: 12px; bottom: var(--room-bottom, 12px); visibility: var(--room-shown, visible); transition: bottom 0.32s cubic-bezier(0.2, 0.9, 0.25, 1); }
@@ -2827,10 +2914,59 @@ span.tm-row { color: var(--text-2); cursor: default; }
2827
2914
  }
2828
2915
  /* a tall screen narrower than the bar's words: Share, the library and Export by their icons; the
2829
2916
  focus gives way to the Time Machine, as on a phone */
2830
- @media (min-width: 641px) and (max-width: 1000px) and (max-aspect-ratio: 5/6) {
2917
+ @media (min-width: 641px) and (max-width: 999px) and (max-aspect-ratio: 5/6) {
2831
2918
  body.tm .focus-wrap { display: none; }
2832
2919
  }
2833
2920
  @media (min-width: 641px) and (max-width: 900px) and (max-aspect-ratio: 5/6) {
2834
2921
  #share-btn > span, #library-btn > span, #export-btn > span { display: none; }
2835
2922
  #bar { gap: 10px; }
2836
2923
  }
2924
+
2925
+ /* ---------------------------------------------------------------- an upright monitor (PhoneSpec decisions 29–35)
2926
+
2927
+ At least 1000 px wide, upright, with a mouse (web/src/monitor.ts): a desktop's page, the board above
2928
+ and a work area across the bottom. The side panel stands at the board's left; in the work area the
2929
+ panel (or what takes its place) is a pane at the left and the windows one column at its right,
2930
+ stacked from the top, each where monitor.ts puts it (--dock-x, --dock-y, --dock-w, --dock-h). The
2931
+ work area's height, the panel's width and what the board has above them are the page's variables
2932
+ (--mon-low, --mon-pane-w, --mon-room-bottom); the splitters (.mon-split) change them. */
2933
+ @media (min-width: 1000px) and (max-aspect-ratio: 5/6) and (pointer: fine) {
2934
+ #side { top: 108px; bottom: var(--mon-room-bottom, 12px); width: 300px; transition: bottom 0.32s cubic-bezier(0.2, 0.9, 0.25, 1); }
2935
+ /* the work area: a surface under the board while something is in it */
2936
+ body::before {
2937
+ content: ""; display: var(--mon-area, none); position: fixed; left: 12px; right: 12px; bottom: 12px; height: var(--mon-low); z-index: 5;
2938
+ pointer-events: none; border-radius: 18px; background: color-mix(in srgb, var(--surface) 70%, transparent); box-shadow: inset 0 0 0 1px var(--line);
2939
+ }
2940
+ /* the panel, or Activity or the lost-and-found in its place: the pane at the work area's left, its
2941
+ whole width where no window is open */
2942
+ #panel, #activity, #lostfound {
2943
+ top: auto; bottom: 12px; left: 12px; right: auto; width: var(--mon-pane-w); height: var(--mon-low);
2944
+ transform: translateY(calc(100% + 60px));
2945
+ }
2946
+ #panel.open, #activity.open, #lostfound.open { transform: none; }
2947
+ /* the windows: in the column, placed there and not dragged; a collapsed one its pill */
2948
+ #windows > .mon-docked {
2949
+ position: fixed !important; left: var(--dock-x) !important; top: var(--dock-y) !important; right: auto !important; bottom: auto !important;
2950
+ width: var(--dock-w) !important; height: var(--dock-h) !important; min-width: 0 !important; min-height: 0 !important;
2951
+ max-width: none !important; max-height: none !important; transform: none;
2952
+ }
2953
+ #windows > .mon-docked.collapsed { width: auto !important; height: auto !important; max-width: 280px !important; }
2954
+ #windows .fl-rz { display: none !important; }
2955
+ #windows .sw-head, #windows .pw-head, #windows > #following.talking > .fl-strip { cursor: default; }
2956
+ /* the review strip at the board's top left, beside the selection bar under the modes */
2957
+ #lensbar, #tm-kept { left: calc(var(--inset-left, 0px) + 12px); transform: none; max-width: calc(100vw - var(--inset-left, 0px) - 448px); }
2958
+ /* the legend and the zoom's box at the foot of the board's room */
2959
+ #foot { left: 320px; bottom: var(--mon-room-bottom, 12px); transition: bottom 0.32s cubic-bezier(0.2, 0.9, 0.25, 1); }
2960
+ #zoom { right: 12px; bottom: var(--mon-room-bottom, 12px); transition: bottom 0.32s cubic-bezier(0.2, 0.9, 0.25, 1); }
2961
+ #welcome, #whatsnew, #following:not(.talking) { bottom: calc(var(--mon-room-bottom, 12px) + 40px); }
2962
+ /* the splitters: the work area's top, between the panel and the column, between two windows */
2963
+ .mon-split { position: fixed; z-index: 36; touch-action: none; }
2964
+ .mon-split-y { cursor: ns-resize; }
2965
+ .mon-split-x { cursor: ew-resize; }
2966
+ .mon-split::after { content: ""; position: absolute; border-radius: 3px; background: var(--text-3); opacity: 0.45; transition: opacity 0.15s, background 0.15s; }
2967
+ .mon-split-y::after { left: calc(50% - 22px); width: 44px; top: 2px; height: 4px; }
2968
+ .mon-split-x::after { top: calc(50% - 22px); height: 44px; left: 2px; width: 4px; }
2969
+ .mon-split:hover::after, .mon-split.on::after { opacity: 1; background: var(--accent); }
2970
+ }
2971
+ .mon-split { display: none; }
2972
+ @media (min-width: 1000px) and (max-aspect-ratio: 5/6) and (pointer: fine) { .mon-split:not([hidden]) { display: block; } }
@@ -53,7 +53,7 @@ What you look at; fields left out keep their value. MCP: `view` (action `move`,
53
53
  | `source` | `true`: the source window open on `sel` |
54
54
  | `paper` | the reference window, for followers: `{"link": "<id>"}` (its file at its place, lit) or `{"file": "<sha256>", "page": 3}`; `null` closes ([library](library.md)) |
55
55
  | `focus` | your own focus on the view: a target's full name; `null`/`"none"`: none; `false`/`"view"`: the view's own. Followers take it. Each view starts you on its own |
56
- | `leave` | `true`: done. Without a token you leave the list until your next request; with one you stay listed while it is in force, view cleared, offline until you wait or request again. Answer `{ok, left: true}` |
56
+ | `leave` | `true`: done. Without a token you leave the list until your next request; with one you stay listed while it is in force, view cleared, offline until you wait or request again. Answer `{ok, left: true}`; `left: false` where your `X-VisualProof-Session` is not the one that waited last (a newer session listens: it stays) |
57
57
 
58
58
  A click on your initials follows you: the page goes to your view (in a new tab) and tracks your
59
59
  selection, what you light up and the source window. The answer says what they see:
@@ -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
 
@@ -29,7 +29,7 @@ Under `/api/agent/`. MCP: `library` (`list`, `file`, `save`, `text`, `search`, `
29
29
  | `GET library/file?sha=` | a file's record and every link into it |
30
30
  | `GET library/bytes?sha=` | the file (MCP `save` writes it to a path you give) |
31
31
  | `GET library/text?sha=&page=` | a PDF page: `text`, `words` (`[text, left, top, right, bottom]`), `lines` (each line's start among the words), `pages`, `size` in points |
32
- | `GET library/search?sha=&q=&limit=` | every match of `q` in the PDF (case and line breaks loosely): `page`, `boxes` of its words, `text`, `before`, `after` |
32
+ | `GET library/search?sha=&q=&limit=` | every match of `q` in the PDF (case, line breaks, curly quotes and dashes loosely): `page`, `boxes` of its words, `text`, `before`, `after` |
33
33
  | `GET library/page?sha=&page=&width=` | the page as a PNG, 400, 800, 1200 (default), 1600 or 2000 px wide (MCP `page`: as an image) |
34
34
  | `GET library/clip?sha=&page=&region=&width=` | a region as a PNG, `region=left,top,right,bottom` |
35
35
  | `GET links?subject=&file=` | a subject's or a file's links, in the order made; all without either |
@@ -12,7 +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_…`.
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.
16
19
  - Every answer is JSON — but the documentation, the MCP server's file and install text, and the
17
20
  files you download. **Every error
18
21
  is `{error, hint}`**: what went wrong and what to do. A name that does not exist answers 404 with
@@ -55,7 +55,7 @@ part (`list` for `GET views`, `read` for `views/view`).
55
55
  | `GET views/view?id=&mode=&members=` | — | scope; holdings `{project, outside}`; items `{add, remove}` (project notes added, taken out: `{id, text}`; `all: true` on the Project); folds; `hidden`; pins; clusters as laid out (`key, depth, count, r, parent, room, at, pinned`), in its own coordinates. `members=1`: its declarations (≤ 5,000) |
56
56
  | `POST views/open {scope, version?, clustering?, focus?}` | — | the view on that query (the open one with the same scope and build, or a new unkept one); you are on it: `{view, holds, note}`. `version`: a snapshot id (`null`, `0`, left out: latest); `clustering`, `focus` (the target it is made from): a new one's |
57
57
  | `POST views/create {name, scope?, clustering?, from?, version?}` | full | a kept, named view on a scope, or a copy of `from` (scope, clustering, pins, folds, items — on the Project, every note its scope would not give, as added — and build; with `scope`, that scope arranged as `from`); `version` keeps it at a build (the Time Machine's Save as new view), `null`/`0` latest |
58
- | `POST views/scope {id, scope}` | full | change what it holds (those on it are told) |
58
+ | `POST views/scope {id, scope}` | full | change what it holds (those on it are told); not the Project, which holds everything (400) |
59
59
  | `POST views/items {id, add?, remove?}` | full | project notes (by id) added or taken out: on the add list only where the scope does not give it, the remove list only where it does. Not the Project (400; deleting is [`note/delete`](notes.md)); 404 for no project note. An Activity event, as a scope change: `{ok, changed, view, items: {add, remove}, notes: [{id, shown}]}` |
60
60
  | `POST views/focus {id, focus}` | full | the view's own focus: a target's full name, or `null`/left out; personal focuses stay: `{ok, changed, view}` |
61
61
  | `POST views/link {id, target}` | full | link a target (a view with targets takes another; an unkept one becomes kept); not the Project, nor a view at a past build (409): `{ok, changed, view, left?}`, `left` the view it leaves |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "visualproof",
3
- "version": "0.4.3",
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",