visualproof 0.6.0 → 0.7.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 (60) hide show
  1. package/README.md +2 -2
  2. package/dist/extractor/Extract.lean +13 -3
  3. package/dist/server/agent.js +102 -2879
  4. package/dist/server/agentactivity.js +72 -0
  5. package/dist/server/agentadvice.js +115 -0
  6. package/dist/server/agentdocs.js +1 -1
  7. package/dist/server/agententry.js +180 -0
  8. package/dist/server/agentexport.js +469 -0
  9. package/dist/server/agentfollow.js +384 -0
  10. package/dist/server/agentgraph.js +128 -0
  11. package/dist/server/agentlean.js +144 -0
  12. package/dist/server/agentlibrary.js +1 -1
  13. package/dist/server/agentplaces.js +242 -0
  14. package/dist/server/agentread.js +569 -0
  15. package/dist/server/agenttalk.js +282 -0
  16. package/dist/server/agenttcb.js +378 -0
  17. package/dist/server/agentviews.js +2 -2
  18. package/dist/server/app.js +377 -0
  19. package/dist/server/appaccess.js +127 -0
  20. package/dist/server/appagent.js +110 -0
  21. package/dist/server/appgraph.js +176 -0
  22. package/dist/server/appshare.js +179 -0
  23. package/dist/server/appsite.js +120 -0
  24. package/dist/server/apptalk.js +178 -0
  25. package/dist/server/artcmd.js +1 -1
  26. package/dist/server/events.js +1 -1
  27. package/dist/server/history.js +51 -3
  28. package/dist/server/historyapi.js +34 -2
  29. package/dist/server/hover.js +11 -7
  30. package/dist/server/identity.js +1 -1
  31. package/dist/server/libraryroute.js +3 -3
  32. package/dist/server/live.js +61 -2
  33. package/dist/server/main.js +17 -1746
  34. package/dist/server/options.js +350 -0
  35. package/dist/server/outside.js +311 -0
  36. package/dist/server/pastdoc.js +22 -3
  37. package/dist/server/project.js +28 -4
  38. package/dist/server/send.js +259 -0
  39. package/dist/server/talk.js +13 -7
  40. package/dist/server/tokens.js +3 -3
  41. package/dist/server/view.js +3 -1
  42. package/dist/server/views.js +1 -1
  43. package/dist/shared/artrecipe.js +3 -3
  44. package/dist/shared/collab.js +1 -1
  45. package/dist/shared/comment.js +1 -1
  46. package/dist/shared/doc/build.js +30 -14
  47. package/dist/shared/doc/latex.js +7 -2
  48. package/dist/shared/doc/model.js +4 -2
  49. package/dist/shared/doc/sections.js +21 -4
  50. package/dist/shared/outside.js +16 -0
  51. package/dist/shared/pastgraph.js +11 -2
  52. package/dist/shared/scope.js +1 -1
  53. package/dist/web/bundle/app.js +49580 -49284
  54. package/dist/web/src/selection.js +1 -1
  55. package/dist/web/src/theme.js +1 -1
  56. package/dist/web/src/visitors.js +1 -1
  57. package/docs/agent-api/export.md +8 -5
  58. package/docs/agent-api/history.md +3 -1
  59. package/docs/agent-api/reading.md +8 -2
  60. package/package.json +1 -1
package/README.md CHANGED
@@ -9,9 +9,9 @@
9
9
  </p>
10
10
  <p align="center"><sub>Five Lean codebases, drawn by <code>visualproof artwork</code>.</sub></p>
11
11
 
12
- https://github.com/user-attachments/assets/98e435d6-f493-437d-b342-1833819c0b77
12
+ https://github.com/user-attachments/assets/941b6599-5b4d-4364-aa81-fc25b8991eeb
13
13
 
14
- <p align="center"><sub>A review of Sphere-Packing-Lean in 74 seconds. The whole tour — four minutes in thirteen chapters, with captions — is in the page under <b>?</b> → Tips, and <a href="https://visualproof-demo.yingte.io/#tips">on the live demo</a>.</sub></p>
14
+ <p align="center"><sub>A review of Sphere-Packing-Lean in 71 seconds. The whole tour — three and a half minutes in thirteen chapters, with captions — is in the page under <b>?</b> → Tips, and <a href="https://visualproof-demo.yingte.io/#tips">on the live demo</a>.</sub></p>
15
15
 
16
16
  [![VisualProof on flt-regular, from the live demo: the TCB of flt_regular, its key declarations approved, an approval recorded at a meeting, the review plan pinned beside it](docs/images/board.webp)](https://visualproof-demo.yingte.io)
17
17
 
@@ -23,7 +23,9 @@ Output, schema 1:
23
23
  the parser and `_aux_` declarations it generates (decision 2), under a name of its
24
24
  own: the syntax kind it declares, or `<kind>.macro_rules` and the like for a rule
25
25
  (`leanName` is the Lean constant, `display` what a card calls it).
26
- externals constants outside the project that a node refers to directly, folded the same way.
26
+ externals constants outside the project that a node refers to directly, folded the same way,
27
+ each with its doc and its range in its own package's or Lean's source, as the
28
+ `.olean` records them.
27
29
  edges [src, dst, sites], `sites` a bit set: 1 = statement, 2 = definition body,
28
30
  4 = inside a proof, 8 = on grammar: into a notation unit that only declares syntax
29
31
  (flagged `grammar`), which no TCB follows. A macro or elaborator depends on the
@@ -1123,8 +1125,16 @@ def run (out : System.FilePath) (projectDir : String) (roots : Array Name)
1123
1125
  let kind := match env.find? c with
1124
1126
  | some ci => kindOf env ci
1125
1127
  | none => "unknown"
1126
- extJs := extJs.push (Json.mkObj [("name", c.toString), ("kind", kind),
1127
- ("module", modName c), ("ax", nodeAx[nodes.size + j]!)])
1128
+ let mut fields : List (String × Json) := [("name", c.toString), ("kind", kind),
1129
+ ("module", modName c), ("ax", nodeAx[nodes.size + j]!)]
1130
+ -- where it is written in its package or in Lean's core, as the `.olean` records it, and its
1131
+ -- doc: the source window shows an outside declaration's source too (ReviewSpec, "The source
1132
+ -- window", the owner's decision of 2026-10-20), which the server finds by its module
1133
+ if let some d ← findDocString? env c then fields := fields ++ [("doc", Json.str d)]
1134
+ if let some r ← findDeclarationRanges? c then
1135
+ fields := fields ++ [("range", Json.arr #[r.range.pos.line, r.range.pos.column,
1136
+ r.range.endPos.line, r.range.endPos.column])]
1137
+ extJs := extJs.push (Json.mkObj fields)
1128
1138
  let metaUnits : Nat := nodes.foldl (init := 0) fun k c =>
1129
1139
  if !notationUnits.contains c && ((env.find? c).map isMetaDecl).getD false then k + 1 else k
1130
1140
  let axioms := (← get).axioms