visualproof 0.6.0 → 0.8.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 (96) hide show
  1. package/README.md +2 -2
  2. package/dist/assets/tips/phone-fingers.light.mp4 +0 -0
  3. package/dist/assets/tips/phone-fingers.light.webp +0 -0
  4. package/dist/assets/tips/tour-agent.webp +0 -0
  5. package/dist/assets/tips/tour-arrange.webp +0 -0
  6. package/dist/assets/tips/tour-artwork.webp +0 -0
  7. package/dist/assets/tips/tour-checks.webp +0 -0
  8. package/dist/assets/tips/tour-export.webp +0 -0
  9. package/dist/assets/tips/tour-keys.webp +0 -0
  10. package/dist/assets/tips/tour-library.webp +0 -0
  11. package/dist/assets/tips/tour-project.webp +0 -0
  12. package/dist/assets/tips/tour-review.webp +0 -0
  13. package/dist/assets/tips/tour-share.webp +0 -0
  14. package/dist/assets/tips/tour-source.webp +0 -0
  15. package/dist/assets/tips/tour-target.webp +0 -0
  16. package/dist/assets/tips/tour-view.webp +0 -0
  17. package/dist/assets/tips/tour.json +90 -90
  18. package/dist/assets/tips/tour.webp +0 -0
  19. package/dist/extractor/Extract.lean +13 -3
  20. package/dist/server/agent.js +104 -2881
  21. package/dist/server/agentactivity.js +72 -0
  22. package/dist/server/agentadvice.js +128 -0
  23. package/dist/server/agentdocs.js +1 -1
  24. package/dist/server/agententry.js +180 -0
  25. package/dist/server/agentexport.js +469 -0
  26. package/dist/server/agentfollow.js +412 -0
  27. package/dist/server/agentgraph.js +128 -0
  28. package/dist/server/agentlean.js +144 -0
  29. package/dist/server/agentlibrary.js +1 -1
  30. package/dist/server/agentplaces.js +242 -0
  31. package/dist/server/agentread.js +569 -0
  32. package/dist/server/agenttalk.js +282 -0
  33. package/dist/server/agenttcb.js +378 -0
  34. package/dist/server/agentviews.js +3 -3
  35. package/dist/server/app.js +379 -0
  36. package/dist/server/appaccess.js +127 -0
  37. package/dist/server/appagent.js +110 -0
  38. package/dist/server/appgraph.js +176 -0
  39. package/dist/server/appshare.js +179 -0
  40. package/dist/server/appsite.js +120 -0
  41. package/dist/server/apptalk.js +195 -0
  42. package/dist/server/artcmd.js +1 -1
  43. package/dist/server/events.js +1 -1
  44. package/dist/server/history.js +51 -3
  45. package/dist/server/historyapi.js +34 -2
  46. package/dist/server/hover.js +11 -7
  47. package/dist/server/identity.js +1 -1
  48. package/dist/server/libraryroute.js +3 -3
  49. package/dist/server/live.js +162 -12
  50. package/dist/server/main.js +17 -1746
  51. package/dist/server/mcptools.js +1 -1
  52. package/dist/server/options.js +350 -0
  53. package/dist/server/outside.js +311 -0
  54. package/dist/server/pastdoc.js +22 -3
  55. package/dist/server/presence.js +25 -8
  56. package/dist/server/project.js +28 -4
  57. package/dist/server/readonlygate.js +4 -0
  58. package/dist/server/reviewapi.js +10 -3
  59. package/dist/server/send.js +259 -0
  60. package/dist/server/talk.js +13 -7
  61. package/dist/server/tokens.js +3 -3
  62. package/dist/server/view.js +3 -1
  63. package/dist/server/views.js +1 -1
  64. package/dist/shared/artrecipe.js +3 -3
  65. package/dist/shared/board.js +9 -8
  66. package/dist/shared/collab.js +54 -7
  67. package/dist/shared/comment.js +1 -1
  68. package/dist/shared/doc/build.js +30 -14
  69. package/dist/shared/doc/latex.js +7 -2
  70. package/dist/shared/doc/model.js +4 -2
  71. package/dist/shared/doc/sections.js +21 -4
  72. package/dist/shared/outside.js +16 -0
  73. package/dist/shared/pastgraph.js +11 -2
  74. package/dist/shared/pointer.js +152 -0
  75. package/dist/shared/query.js +36 -5
  76. package/dist/shared/review.js +34 -2
  77. package/dist/shared/scope.js +1 -1
  78. package/dist/shared/sharesnap.js +15 -0
  79. package/dist/shared/titles.js +4 -0
  80. package/dist/web/bundle/app.js +51061 -49518
  81. package/dist/web/index.html +4 -0
  82. package/dist/web/src/canvas.js +16 -14
  83. package/dist/web/src/highlight.js +8 -3
  84. package/dist/web/src/reviewqueue.js +52 -10
  85. package/dist/web/src/selection.js +1 -1
  86. package/dist/web/src/status.js +65 -1
  87. package/dist/web/src/theme.js +1 -1
  88. package/dist/web/src/visitors.js +1 -1
  89. package/dist/web/style.css +121 -7
  90. package/docs/agent-api/advice.md +4 -1
  91. package/docs/agent-api/export.md +8 -5
  92. package/docs/agent-api/following.md +9 -3
  93. package/docs/agent-api/history.md +3 -1
  94. package/docs/agent-api/reading.md +8 -2
  95. package/docs/agent-api/views.md +3 -1
  96. package/package.json +1 -1
@@ -8,7 +8,8 @@ people see of you.
8
8
  MCP: `companion`.
9
9
 
10
10
  ```json
11
- { "rev": 9, "now": "…", "sharedBy": { "name": "Alice", "here": true }, "privateCount": 0,
11
+ { "rev": 9, "now": "…", "sharedBy": { "name": "Alice", "here": true }, "privateCount": 1,
12
+ "followedBy": { "people": ["Bob"], "private": 1 },
12
13
  "people": [ { "name": "Alice", "idle": false, "pages": 1, "place": { "view": "vqoca3xy",
13
14
  "targets": ["flt_regular"], "mode": "tcb", "selection": "tcb(IsRegularPrime)", … } } ],
14
15
  "agents": [ { "name": "Alice's AI", "state": "working", "lastSeen": "…", "you": true, … } ] }
@@ -21,6 +22,8 @@ MCP: `companion`.
21
22
  take the name while it is in force). `idle`: no input for 5 minutes, or the page in background.
22
23
  - `privateCount`: people here privately — not in `people`, place unknown, not followable; their
23
24
  coming or going is a change for `wait`. An agent cannot be private: you are always listed.
25
+ - `followedBy`: who follows you — people by name (`null`: a page without one), private readers
26
+ counted only; readers by a read-only link are never told of. A change of it is one for `wait`.
24
27
 
25
28
  | `place` field | meaning |
26
29
  |---|---|
@@ -30,12 +33,15 @@ MCP: `companion`.
30
33
  | `source`, `sourceCollapsed` | the source window following their selection: open; collapsed to its pill |
31
34
  | `pinned` | pinned source windows, first pinned first, `{declaration, collapsed}`; followers mirror them (an agent pins none) |
32
35
  | `history` | `{snapshot, built}`: the build they browse in the Time Machine |
33
- | `activity`, `lostAndFound`, `colouring`, `edges` | what else followers take, where their page says it (a page from before, and an agent, say none): `activity` `{open, kind, who, mine?}` (kind: all, review, build, change; who: all, agents, people; `mine`: the person whose targets it keeps to); `lostAndFound` `{open}`; `colouring` `kind` or `status`; edges drawn or not |
36
+ | `activity`, `lostAndFound`, `colouring`, `edges` | what else followers take, where their page says it (a page from before, and an agent, say none): `activity` `{open, kind, who, mine?}` (kind: all, review, build, change; who: all, agents, people; `mine`: the person whose targets it keeps to); `lostAndFound` `{open}`; `colouring` `kind`, `status` or `mine` (their own review); edges drawn or not |
37
+ | `export` | their Export window, which followers see too: `{open}`; open, its `settings` (`paper`, `fontSize`, `codeSize`, `contents`) and the document typeset, `job` `{id, state, error?}` — `GET /api/agent/export/job?id=` reads it, its files are yours to fetch ([export](export.md)) |
34
38
  | `inWords` | the place in words; of the row above, only what differs from a fresh page |
35
39
 
36
40
  `wait=<s>` (≤ 60) waits until someone comes, goes, goes idle or moves (view, selection,
37
41
  declaration, tool, a source window pinned, collapsed or closed, Activity, lost-and-found,
38
- colouring, edges; no camera pan), then answers. `since=<rev>`, your last `rev`: a
42
+ colouring, edges, the Export window, who follows you; no camera pan), then answers. Whom people
43
+ follow is not said but for you (`followedBy`); you follow nobody, and have no pointer (people in a
44
+ room see one another's). `since=<rev>`, your last `rev`: a
39
45
  change you have not seen answers at once; `changed`: whether `rev` moved. To follow someone: wait,
40
46
  then `POST view` with their view and declaration.
41
47
 
@@ -71,7 +71,9 @@ A snapshot's graph (latest without `id`), as the page reads the graph on show, n
71
71
  `projectCount` nodes are the project's, `{name, kind, module, ax, type, doc?, range?, also?, flags?,
72
72
  leanName?, display?, hash, kernel?}` (`hash`: its version under the renames in force, comparable
73
73
  with opinions' and the graph on show's; `kernel`: the kernel hash read with); then outside ones,
74
- `{name, kind, module, ax, ext: true}`. `ax` indexes `axiomSets`, whose entries index `axioms`;
74
+ `{name, kind, module, ax, ext: true, range?}`. A snapshot's `packages`: `{revs: {<package>: <rev>},
75
+ from: "read" | "commit"}`, the lake-manifest's revisions then (`commit`: from the build's commit,
76
+ for one read before 0.7.0); outside sources are shown only where those are the revisions now. `ax` indexes `axiomSets`, whose entries index `axioms`;
75
77
  `edges`: flat `src, dst, sites` triples (sites as in `uses`).
76
78
 
77
79
  Large (flt-regular's: 0.8 MB of JSON, 139 KB gzipped; an 8,000-declaration project's: 14 MB, 2.6 MB gzipped):
@@ -71,7 +71,11 @@ As the source window shows it: docstring, attributes and proof included.
71
71
  resolved, a `variable` per binder) or read from the text, per its `precision`.
72
72
  - Advice records `context`, a blank line, `text` (just `text` if `context` is ""), as people's do.
73
73
  - `compiled: false` (with `note`): file changed since compiled; the present text, found by name;
74
- advice waits for the next build. Outside the project: 404 (use `describe`, `print`).
74
+ advice waits for the next build.
75
+ - **Outside the project** (a package of the lake-manifest, Lean's core): its file in its package,
76
+ with `outside`: `{package, core, rev, github}` (`github`: `{repo, rev, path}`, or null where not
77
+ on GitHub; core: `leanprover/lean4` at the toolchain's tag); `compiled: false` where the package
78
+ is at another revision than the graph was read at. 404 where its file is not found.
75
79
  - A unit (`also`, `alsoNote`): what the same command generated, listed with it (`print` each);
76
80
  advice on the unit covers them, its hash changes with them. `generatedNote`: generated by a
77
81
  command none of whose declarations could fold it in; its source is the command's text.
@@ -83,7 +87,9 @@ that text (`GET context`: latest build only). `check`: `lake` (Lake hash matches
83
87
  hash kept, a build from before texts were kept: the one candidate agreeing with every recorded
84
88
  place: imports, declaration bounds, doc comments, names). Text not kept (edited after the build and
85
89
  not in the commit, or no match): 404, `kept: false`, why in `error`, statement and doc then; never
86
- another text. Not reviewed: advice is on the latest build.
90
+ another text. Not reviewed: advice is on the latest build. Outside the project nothing is kept per
91
+ build: `check: "rev"`, the package's file now, where its revision then (or the toolchain) is the
92
+ one now; else 404, `kept: false`, both revisions in `error`.
87
93
 
88
94
  ## `GET /api/agent/context?name=`
89
95
 
@@ -38,7 +38,9 @@ board holds, else `null`. Your own focus (`POST view {focus}`) changes nothing o
38
38
  directly: the page's Direct), `decl(A, B)`, `key(T)` (the target and the declarations
39
39
  marked key for it that its review still holds; `key(targets)`: every target's), `ns(P)`, `file(P)`,
40
40
  `trusted`, `external`, `kind(theorem, def)`, `status(unreviewed|approved|commented|stale)`,
41
- `advice(approve|comment)`, `sorry`, `nonstandard`; joined left to right by `and`, `or`, `except`;
41
+ `advice(approve|comment)`, `sorry`, `nonstandard`; `mine(approved|commented|stale|none)`, where
42
+ the reader's own review stands: on a person's page theirs, for you (advice is no opinion) nothing;
43
+ joined left to right by `and`, `or`, `except`;
42
44
  parentheses group; a closure may take a query (`tcb(ns(P) except external)`); a name that needs it
43
45
  is in JSON quotes. A target's review set: `tcb(T) except trusted or (uses(T) and kind(axiom) and
44
46
  nonstandard)`. At most 20,000 characters, 32 levels of nesting, 1,000 parts, 2,000 names, 64
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "visualproof",
3
- "version": "0.6.0",
3
+ "version": "0.8.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",