visualproof 0.7.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.
- package/dist/assets/tips/phone-fingers.light.mp4 +0 -0
- package/dist/assets/tips/phone-fingers.light.webp +0 -0
- package/dist/assets/tips/tour-agent.webp +0 -0
- package/dist/assets/tips/tour-arrange.webp +0 -0
- package/dist/assets/tips/tour-artwork.webp +0 -0
- package/dist/assets/tips/tour-checks.webp +0 -0
- package/dist/assets/tips/tour-export.webp +0 -0
- package/dist/assets/tips/tour-keys.webp +0 -0
- package/dist/assets/tips/tour-library.webp +0 -0
- package/dist/assets/tips/tour-project.webp +0 -0
- package/dist/assets/tips/tour-review.webp +0 -0
- package/dist/assets/tips/tour-share.webp +0 -0
- package/dist/assets/tips/tour-source.webp +0 -0
- package/dist/assets/tips/tour-target.webp +0 -0
- package/dist/assets/tips/tour-view.webp +0 -0
- package/dist/assets/tips/tour.json +90 -90
- package/dist/assets/tips/tour.webp +0 -0
- package/dist/server/agent.js +2 -2
- package/dist/server/agentadvice.js +16 -3
- package/dist/server/agentfollow.js +32 -4
- package/dist/server/agentviews.js +1 -1
- package/dist/server/app.js +3 -1
- package/dist/server/apptalk.js +21 -4
- package/dist/server/live.js +101 -10
- package/dist/server/mcptools.js +1 -1
- package/dist/server/presence.js +25 -8
- package/dist/server/readonlygate.js +4 -0
- package/dist/server/reviewapi.js +10 -3
- package/dist/shared/board.js +9 -8
- package/dist/shared/collab.js +53 -6
- package/dist/shared/pointer.js +152 -0
- package/dist/shared/query.js +36 -5
- package/dist/shared/review.js +34 -2
- package/dist/shared/sharesnap.js +15 -0
- package/dist/shared/titles.js +4 -0
- package/dist/web/bundle/app.js +1495 -248
- package/dist/web/index.html +4 -0
- package/dist/web/src/canvas.js +16 -14
- package/dist/web/src/highlight.js +8 -3
- package/dist/web/src/reviewqueue.js +52 -10
- package/dist/web/src/status.js +65 -1
- package/dist/web/style.css +121 -7
- package/docs/agent-api/advice.md +4 -1
- package/docs/agent-api/following.md +9 -3
- package/docs/agent-api/views.md +3 -1
- package/package.json +1 -1
package/dist/web/index.html
CHANGED
|
@@ -225,6 +225,10 @@
|
|
|
225
225
|
</footer>
|
|
226
226
|
|
|
227
227
|
<div id="notes"></div>
|
|
228
|
+
<!-- the pointers of this page's room, their text selections, a click's ripple, a mark at the edge
|
|
229
|
+
of what holds one scrolled away (web/src/pointers.ts): every press goes through but the
|
|
230
|
+
marks' -->
|
|
231
|
+
<div id="pointers" aria-hidden="true"></div>
|
|
228
232
|
<!-- the canvas's menu: a right click, the ContextMenu key or Shift+F10 (web/src/ctxmenu.ts) -->
|
|
229
233
|
<div id="ctxmenu" role="menu" aria-label="Actions" tabindex="-1" hidden></div>
|
|
230
234
|
<!-- the floating windows, the one pressed or focused last in front (web/src/floatwin.ts): the
|
package/dist/web/src/canvas.js
CHANGED
|
@@ -208,7 +208,8 @@ export class GraphCanvas {
|
|
|
208
208
|
/** how the points are coloured (setScheme): by kind, or by where each stands (CanvasSpec,
|
|
209
209
|
* "Colour schemes", decided 2026-10-08) */
|
|
210
210
|
scheme = "kind";
|
|
211
|
-
/** per node, its state in the Status scheme (web/src/status.ts),
|
|
211
|
+
/** per node, its state in the Status scheme — in the Mine scheme, its Mine state — (web/src/status.ts),
|
|
212
|
+
* from setStatus */
|
|
212
213
|
statusCode = new Uint8Array(0);
|
|
213
214
|
/** per cluster, of what it holds that needs review: how many are approved, commented, and in
|
|
214
215
|
* all (the Status scheme's progress arcs) */
|
|
@@ -513,17 +514,18 @@ export class GraphCanvas {
|
|
|
513
514
|
isKey(i) {
|
|
514
515
|
return this.keyList.includes(i);
|
|
515
516
|
}
|
|
516
|
-
/** Where each node of the canvas's graph stands (web/src/status.ts, statusCodes
|
|
517
|
-
* the Status scheme, and the clusters' progress. */
|
|
517
|
+
/** Where each node of the canvas's graph stands (web/src/status.ts, statusCodes; mineCodes in the
|
|
518
|
+
* Mine scheme): its colour in the Status or the Mine scheme, and the clusters' progress. */
|
|
518
519
|
setStatus(codes) {
|
|
519
520
|
this.statusCode = codes.length === this.g.n ? codes : new Uint8Array(this.g.n).fill(ST_UNREVIEWED);
|
|
520
521
|
this.countProgress();
|
|
521
|
-
if (this.scheme
|
|
522
|
+
if (this.scheme !== "kind")
|
|
522
523
|
this.clearCards();
|
|
523
524
|
this.invalidate();
|
|
524
525
|
}
|
|
525
|
-
/** Colour the points by kind
|
|
526
|
-
* the
|
|
526
|
+
/** Colour the points by kind, by status or by the reader's own review (Mine, in Status's colours,
|
|
527
|
+
* from the codes setStatus was given). Rings, the target's star and the others' marks are the same
|
|
528
|
+
* in each. */
|
|
527
529
|
setScheme(s) {
|
|
528
530
|
if (s === this.scheme)
|
|
529
531
|
return;
|
|
@@ -2208,7 +2210,7 @@ export class GraphCanvas {
|
|
|
2208
2210
|
/** A node's colour in the scheme in force. */
|
|
2209
2211
|
colorOf(i) {
|
|
2210
2212
|
const th = this.theme;
|
|
2211
|
-
if (this.scheme
|
|
2213
|
+
if (this.scheme !== "kind")
|
|
2212
2214
|
return th.status[this.statusCode[i] ?? ST_UNREVIEWED];
|
|
2213
2215
|
return this.g.isExt(i) ? th.ext : th.kind[this.g.nodes[i].kind] ?? th.ext;
|
|
2214
2216
|
}
|
|
@@ -2894,12 +2896,12 @@ export class GraphCanvas {
|
|
|
2894
2896
|
const bg = this.theme.bg;
|
|
2895
2897
|
writeNames(this.ctx, names, halo ?? `rgb(${Math.round(bg[0] * 255)}, ${Math.round(bg[1] * 255)}, ${Math.round(bg[2] * 255)})`);
|
|
2896
2898
|
}
|
|
2897
|
-
/** In the Status
|
|
2898
|
-
* arc from the top, clockwise, for the share approved,
|
|
2899
|
-
* it holds that needs review. Only on circles large
|
|
2900
|
-
* has been said. */
|
|
2899
|
+
/** In the Status and Mine schemes, how far the review of each cluster on screen has come — the
|
|
2900
|
+
* reader's own in Mine —, on its outline: an arc from the top, clockwise, for the share approved,
|
|
2901
|
+
* then one for the share commented, of what it holds that needs review. Only on circles large
|
|
2902
|
+
* enough to read it, and only where something has been said. */
|
|
2901
2903
|
drawProgress(onScreen) {
|
|
2902
|
-
if (this.scheme
|
|
2904
|
+
if (this.scheme === "kind" || !this.clusterProgress.length)
|
|
2903
2905
|
return;
|
|
2904
2906
|
const S = this.scene;
|
|
2905
2907
|
const P = this.clusterProgress;
|
|
@@ -3216,7 +3218,7 @@ export class GraphCanvas {
|
|
|
3216
3218
|
const [x, y] = this.toScreen(W.vx[k], W.vy[k]);
|
|
3217
3219
|
if (!onScreen(x, y, 200))
|
|
3218
3220
|
return;
|
|
3219
|
-
const c = this.scheme
|
|
3221
|
+
const c = this.scheme !== "kind" ? th.status[v.status] ?? th.status[ST_UNREVIEWED] : v.kind === "external" ? th.ext : th.kind[v.kind] ?? th.ext;
|
|
3220
3222
|
ctx.fillStyle = css(th.bg);
|
|
3221
3223
|
ctx.beginPath();
|
|
3222
3224
|
ctx.arc(x, y, R + 3 + (v.axiom ? AXIOM_OUT : 0), 0, 2 * Math.PI);
|
|
@@ -3690,7 +3692,7 @@ export class GraphCanvas {
|
|
|
3690
3692
|
const el = document.createElement("div");
|
|
3691
3693
|
// its dot has its point's colour, in the scheme in force (style.css, .card.s-*); nothing else on
|
|
3692
3694
|
// a card tells of its status
|
|
3693
|
-
const st = this.scheme
|
|
3695
|
+
const st = this.scheme !== "kind" ? ` ss s-${STATUSES[this.statusCode[i] ?? ST_UNREVIEWED]}` : "";
|
|
3694
3696
|
el.className = `card ${kindDot(v.kind, g.isExt(i))}${st}${this.targetList.includes(i) ? " target" : this.keyList.includes(i) ? " key" : ""}`;
|
|
3695
3697
|
el.dataset.node = String(i);
|
|
3696
3698
|
// on a past graph, its marks against now: a renamed one's name now among them
|
|
@@ -50,15 +50,20 @@ const HANG_MAX = 24;
|
|
|
50
50
|
* width hangs its continuations a few characters further in (web/style.css). The text is the
|
|
51
51
|
* source's to the character, its line breaks included — each at the end of its line's element —
|
|
52
52
|
* so that offsets in it are offsets in the source (web/src/sourcewin.ts, positionAt) and copying
|
|
53
|
-
* it copies the source. A token across lines (a comment) is cut into one piece per line.
|
|
54
|
-
|
|
53
|
+
* it copies the source. A token across lines (a comment) is cut into one piece per line.
|
|
54
|
+
*
|
|
55
|
+
* `first`: the line of the file the text starts at (from 1), for the source window's gutter
|
|
56
|
+
* (web/src/gutter.ts): each line carries its number as `data-n`, which the style draws beside it,
|
|
57
|
+
* outside the text. */
|
|
58
|
+
export function highlightLines(src, isRef, first) {
|
|
55
59
|
const lines = tokenLines(tokenizeLean(src));
|
|
56
60
|
return src
|
|
57
61
|
.split("\n")
|
|
58
62
|
.map((text, k) => {
|
|
59
63
|
const indent = Math.min(/^ */.exec(text)[0].length, HANG_MAX);
|
|
60
64
|
const html = (lines[k] ?? []).map((t) => tokenHtml(t, isRef)).join("");
|
|
61
|
-
|
|
65
|
+
const n = first !== undefined ? ` data-n="${first + k}"` : "";
|
|
66
|
+
return `<span class="ln"${n} style="--in:${indent}">${html}${k < lines.length - 1 ? "\n" : ""}</span>`;
|
|
62
67
|
})
|
|
63
68
|
.join("");
|
|
64
69
|
}
|
|
@@ -19,14 +19,25 @@
|
|
|
19
19
|
// apart as "+N trusted") and all (approved of the review). They are marked ◆ in the review list,
|
|
20
20
|
// which can show them alone, the trusted ones among them (the owner's decision of 2026-10-19: a key
|
|
21
21
|
// declaration is a member of the TCB, trusted or not); what each supports is shared/keys.ts.
|
|
22
|
+
//
|
|
23
|
+
// The list can keep to the reader's own review (the owner's decision of 2026-10-20): what they have
|
|
24
|
+
// not reviewed, where theirs is stale, or what they commented on — a reading preference of theirs,
|
|
25
|
+
// as the order is, by their own opinions alone (shared/review.ts, ownStatus). The strip's progress
|
|
26
|
+
// stays the team's: there is no personal progress beside it.
|
|
22
27
|
import { SITE_STMT } from "../../shared/graph.js";
|
|
23
|
-
import { advice, adviceOf, fresh, statusOf } from "../../shared/review.js";
|
|
28
|
+
import { advice, adviceOf, fresh, ownStatus, statusOf } from "../../shared/review.js";
|
|
24
29
|
import { keyCounts, keyGraph } from "../../shared/keys.js";
|
|
25
30
|
import { keyMarks, trustedBy } from "../../shared/review.js";
|
|
26
31
|
import { inTargets, nonStandardAxiom, offBoard, queueProgress, reviewQueue, settled, TCB_SITES, whyChain } from "../../shared/reviewqueue.js";
|
|
27
32
|
import { BOT } from "./agentmark.js";
|
|
28
33
|
import { escapeHtml } from "./highlight.js";
|
|
29
34
|
import { SHIELD } from "./trust.js";
|
|
35
|
+
export const OWN_FILTERS = ["none", "stale", "commented"];
|
|
36
|
+
const OWN_WORDS = {
|
|
37
|
+
none: { label: "Not reviewed", title: "Only what you have given no opinion on (none, or one withdrawn)", note: "you have not reviewed" },
|
|
38
|
+
stale: { label: "Stale", title: "Only where your opinion is on an earlier version: it changed since", note: "where your opinion is stale" },
|
|
39
|
+
commented: { label: "Commented", title: "Only what your current opinion comments on", note: "you commented on" },
|
|
40
|
+
};
|
|
30
41
|
/** How a declaration reads in a chain: with its namespace's last part, which tells `Module.env`
|
|
31
42
|
* from `ModExpr.env`. */
|
|
32
43
|
function chainName(g, i) {
|
|
@@ -197,16 +208,33 @@ export class ReviewFlow {
|
|
|
197
208
|
* where it is used; one the graph has no declaration for on the board is listed first, and goes
|
|
198
209
|
* to the target, whose panel approves it. `keyOnly` (◆ Key): the key declarations alone, in their
|
|
199
210
|
* order (shared/keys.ts, keySet) — the trusted ones first, marked trusted and unnumbered, since
|
|
200
|
-
* they are not in the review order; then the rest, numbered as in the review order.
|
|
201
|
-
|
|
211
|
+
* they are not in the review order; then the rest, numbered as in the review order. `own`: only
|
|
212
|
+
* those where the reader's own review stands so (OwnFilter), the trusted key declarations, which
|
|
213
|
+
* need none, left out; the filter's switch heads the list where the reader has a name. */
|
|
214
|
+
listHtml(root, keyOnly = false, own = null) {
|
|
202
215
|
const g = this.hooks.graph();
|
|
203
216
|
const d = this.hooks.review();
|
|
204
217
|
const q = this.queue(root);
|
|
205
218
|
const kg = this.keys(root);
|
|
206
219
|
const keys = new Set(kg.keys);
|
|
207
|
-
const
|
|
220
|
+
const me = this.hooks.me?.() ?? null;
|
|
221
|
+
// where the reader's own review of each stands, by name (an axiom off the board has no version)
|
|
222
|
+
const ownOf = (name, hash) => (me ? ownStatus(d, name, me, hash) : "none");
|
|
223
|
+
const position0 = new Set(q.order);
|
|
224
|
+
const allOff = keyOnly ? [] : offBoard(q);
|
|
225
|
+
const allOrder = keyOnly ? kg.keys : q.order;
|
|
226
|
+
// the counts each filter would show, of what needs review in the list
|
|
227
|
+
const counts = new Map();
|
|
228
|
+
for (const a of allOff)
|
|
229
|
+
counts.set(ownOf(a.name, undefined), (counts.get(ownOf(a.name, undefined)) ?? 0) + 1);
|
|
230
|
+
for (const i of allOrder)
|
|
231
|
+
if (position0.has(i))
|
|
232
|
+
counts.set(ownOf(g.nodes[i].name, g.nodes[i].hash), (counts.get(ownOf(g.nodes[i].name, g.nodes[i].hash)) ?? 0) + 1);
|
|
233
|
+
const filter = me ? own : null;
|
|
234
|
+
const keep = (name, hash) => filter === null || ownOf(name, hash) === filter;
|
|
235
|
+
const off = allOff.filter((a) => keep(a.name, undefined));
|
|
208
236
|
// the positions are the review order's, also where only the key declarations are listed
|
|
209
|
-
const order =
|
|
237
|
+
const order = filter === null ? allOrder : allOrder.filter((i) => position0.has(i) && keep(g.nodes[i].name, g.nodes[i].hash));
|
|
210
238
|
const position = new Map(q.order.map((i, k) => [i, k]));
|
|
211
239
|
const offN = offBoard(q).length;
|
|
212
240
|
const where = (a) => (a.via.length ? ` · used in ${a.via.map((j) => chainName(g, j)).join(", ")}` : "");
|
|
@@ -214,11 +242,25 @@ export class ReviewFlow {
|
|
|
214
242
|
const offRows = off.map((a, k) => `<button class="row q-row rv-${statusOf(d, a.name, undefined)}${this.axiomDone(a) ? " q-mine" : ""}" data-walk="${root}" title="${escapeHtml(`${a.name}: a non-standard axiom the target rests on, which the graph has no declaration for${where(a)} — approve it or comment on it in the target's panel`)}">` +
|
|
215
243
|
`<span class="q-n">${k + 1}</span>axiom ${escapeHtml(a.name)}<span class="muted">${escapeHtml(where(a))}</span></button>`);
|
|
216
244
|
const kp = this.keyProgress(root);
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
`${
|
|
221
|
-
|
|
245
|
+
const shown = order.length + off.length;
|
|
246
|
+
const note = filter !== null
|
|
247
|
+
? shown
|
|
248
|
+
? `${shown} of ${allOrder.filter((i) => position0.has(i)).length + allOff.length} ${OWN_WORDS[filter].note}, in review order.`
|
|
249
|
+
: `Nothing here ${OWN_WORDS[filter].note}.`
|
|
250
|
+
: keyOnly
|
|
251
|
+
? `The key declarations, ◆, ${kp.trusted ? `${kp.trusted} trusted first, needing no review, then the rest ` : ""}in review order: ${kp.approved} of ${kp.total} approved, ${this.keysLeft(root)} not yet reviewed by you.`
|
|
252
|
+
: `Non-standard axioms first, then bottom-up: what a declaration uses comes before it; ` +
|
|
253
|
+
`${this.left(root)} of ${q.order.length + offN} not yet reviewed by you.`;
|
|
254
|
+
// the filter by one's own review: All, then each with how many it keeps; a reader without a name
|
|
255
|
+
// has no review of their own to keep to
|
|
256
|
+
const switcher = me
|
|
257
|
+
? `<div class="q-own" role="group" aria-label="Only by your own review"><span class="muted">Yours:</span><span class="seg mini">` +
|
|
258
|
+
`<button data-q-own="" class="${filter === null ? "on" : ""}" aria-pressed="${filter === null}" title="Everything in the list">All</button>` +
|
|
259
|
+
OWN_FILTERS.map((f) => `<button data-q-own="${f}" class="${filter === f ? "on" : ""}" aria-pressed="${filter === f}" title="${OWN_WORDS[f].title}">${OWN_WORDS[f].label} <span class="q-own-n">${counts.get(f) ?? 0}</span></button>`).join("") +
|
|
260
|
+
`</span></div>`
|
|
261
|
+
: "";
|
|
262
|
+
return (switcher +
|
|
263
|
+
`<div class="q-note muted">${note}</div>` +
|
|
222
264
|
`<div class="q-list">` +
|
|
223
265
|
offRows.join("") +
|
|
224
266
|
order
|
package/dist/web/src/status.js
CHANGED
|
@@ -5,8 +5,16 @@
|
|
|
5
5
|
// review at all (not yet reviewed, trusted). A file being compiled shows so while it lasts. What
|
|
6
6
|
// agents advise is not among the states: advice is never counted, and the panel shows it apart
|
|
7
7
|
// (AgentSpec decision 2).
|
|
8
|
-
|
|
8
|
+
//
|
|
9
|
+
// The Mine scheme (the owner's decision of 2026-10-20) colours by Status's review states from one
|
|
10
|
+
// reader's own opinions alone: approved, commented, stale where theirs is, else not yet reviewed or
|
|
11
|
+
// trusted as whether it needs review says — no build, no sorry, nobody else's opinion. Whose they
|
|
12
|
+
// are is the reader's, or the followed reader's while following (CollabSpec decision 4); a reader
|
|
13
|
+
// without a name has none, and the board shows only what needs review.
|
|
14
|
+
import { ownStatus, statusOf } from "../../shared/review.js";
|
|
9
15
|
import { needsReview } from "../../shared/reviewqueue.js";
|
|
16
|
+
/** The schemes in the order the legend lists them and `c` steps through them. */
|
|
17
|
+
export const SCHEMES_SHOWN = ["kind", "status", "mine"];
|
|
10
18
|
/** The states, most urgent first; a declaration's code is its index here. The legend lists them in
|
|
11
19
|
* this order, and the CSS colours are `--status-<state>`. */
|
|
12
20
|
export const STATUSES = ["failed", "building", "sorry", "commented", "stale", "approved", "unreviewed", "trusted"];
|
|
@@ -33,6 +41,62 @@ export const STATUS_HINT = {
|
|
|
33
41
|
unreviewed: "Nobody has given an opinion on it yet, and nothing trusts it",
|
|
34
42
|
trusted: "Trusted without review (Mathlib, Lean core, a trusted prefix, the standard axioms), with no opinion on it",
|
|
35
43
|
};
|
|
44
|
+
/** The Mine scheme's states, in the legend's order: Status's review states (STATUSES' codes). */
|
|
45
|
+
export const MINE_STATES = [ST_COMMENTED, ST_STALE, ST_APPROVED, ST_UNREVIEWED, ST_TRUSTED];
|
|
46
|
+
/** How the legend's tooltips and the hover tip say a Mine state, of `whose` opinions (null: the
|
|
47
|
+
* reader's own). */
|
|
48
|
+
export function mineLabel(code, whose) {
|
|
49
|
+
const who = whose ?? "you";
|
|
50
|
+
switch (code) {
|
|
51
|
+
case ST_COMMENTED:
|
|
52
|
+
return `${who} commented`;
|
|
53
|
+
case ST_STALE:
|
|
54
|
+
return `${whose ? `${whose}'s` : "your"} opinion is stale`;
|
|
55
|
+
case ST_APPROVED:
|
|
56
|
+
return `${who} approved`;
|
|
57
|
+
case ST_TRUSTED:
|
|
58
|
+
return "trusted";
|
|
59
|
+
default:
|
|
60
|
+
return `not reviewed by ${whose ?? "you"}`;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/** What each Mine state means, for the legend's tooltips. */
|
|
64
|
+
export function mineHint(code, whose) {
|
|
65
|
+
const your = whose ? `${whose}'s` : "Your";
|
|
66
|
+
switch (code) {
|
|
67
|
+
case ST_COMMENTED:
|
|
68
|
+
return `${your} current opinion on its present version is a comment`;
|
|
69
|
+
case ST_STALE:
|
|
70
|
+
return `${your} current opinion is on an earlier version: it changed since`;
|
|
71
|
+
case ST_APPROVED:
|
|
72
|
+
return `${your} current opinion approves its present version`;
|
|
73
|
+
case ST_TRUSTED:
|
|
74
|
+
return `Trusted without review, and no opinion of ${whose ? `${whose}'s` : "yours"} on it`;
|
|
75
|
+
default:
|
|
76
|
+
return `It needs review, and ${whose ? `${whose} has` : "you have"} no opinion on it (none given, or withdrawn)`;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/** Where one declaration stands in the Mine scheme, for `me` (null: a reader without a name, who
|
|
80
|
+
* has none): their current opinion — on its present version, a comment or an approval; on an
|
|
81
|
+
* earlier one, stale — else whether it needs review. */
|
|
82
|
+
export function mineState(d, g, i, me) {
|
|
83
|
+
const v = g.nodes[i];
|
|
84
|
+
const s = me ? ownStatus(d, v.name, me, v.hash) : "none";
|
|
85
|
+
if (s === "stale")
|
|
86
|
+
return ST_STALE;
|
|
87
|
+
if (s === "commented")
|
|
88
|
+
return ST_COMMENTED;
|
|
89
|
+
if (s === "approved")
|
|
90
|
+
return ST_APPROVED;
|
|
91
|
+
return needsReview(g, d, i) ? ST_UNREVIEWED : ST_TRUSTED;
|
|
92
|
+
}
|
|
93
|
+
/** Every declaration of `g`'s state in the Mine scheme, as codes (indices into STATUSES). */
|
|
94
|
+
export function mineCodes(d, g, me) {
|
|
95
|
+
const out = new Uint8Array(g.n);
|
|
96
|
+
for (let i = 0; i < g.n; i++)
|
|
97
|
+
out[i] = mineState(d, g, i, me);
|
|
98
|
+
return out;
|
|
99
|
+
}
|
|
36
100
|
/** Where one declaration stands. `file` is its file's build status, when the page is live.
|
|
37
101
|
*
|
|
38
102
|
* "Contains sorry" is read from the axioms it rests on (sorryAx), which Lean collects through
|
package/dist/web/style.css
CHANGED
|
@@ -419,7 +419,16 @@ body.art-moving :is(#bar .brand, #bar .library-wrap, #export-btn, #activity-btn,
|
|
|
419
419
|
.rv-op.rv-comment .rv-dot { background: var(--rv-commented); }
|
|
420
420
|
.rv-op.old .rv-dot { background: var(--rv-stale); }
|
|
421
421
|
.rv-c { margin: 2px 0 0 14px; padding: 4px 8px; background: var(--code-bg); border-radius: 6px; white-space: pre-wrap; font-size: 12px; }
|
|
422
|
-
|
|
422
|
+
/* the opinions' head (ReviewSpec, "One review box", the owner's decision of 2026-10-20): how many
|
|
423
|
+
stand and came before, and the one toggle that folds them all to a line each or shows them all */
|
|
424
|
+
.rv-ops-h { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--text-2); }
|
|
425
|
+
.rv-ops-n b { color: var(--text); font-weight: 600; }
|
|
426
|
+
.rv-fold { margin-left: auto; flex: none; font: 600 11.5px var(--font); color: var(--accent); background: none; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 999px; padding: 1px 9px; cursor: pointer; }
|
|
427
|
+
.rv-fold:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
|
|
428
|
+
.rv-fold:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
|
429
|
+
/* the history, with the opinions shown: the earlier and withdrawn ones under the current */
|
|
430
|
+
.rv-hist { display: flex; flex-direction: column; gap: 4px; }
|
|
431
|
+
.rv-hist-h { color: var(--text-2); font-size: 11.5px; }
|
|
423
432
|
.rv-hist .rv-op { margin-left: 8px; }
|
|
424
433
|
/* an opinion withdrawn, and its withdrawal, in the history (ReviewSpec decision 9): faded, the
|
|
425
434
|
withdrawal's dot hollow */
|
|
@@ -524,6 +533,17 @@ body.art-moving :is(#bar .brand, #bar .library-wrap, #export-btn, #activity-btn,
|
|
|
524
533
|
:root[data-theme="dark"] .rv-btn.approve:focus-visible { outline-color: var(--rv-approved); }
|
|
525
534
|
:root[data-theme="dark"] .rv-btn.comment:focus-visible { outline-color: var(--rv-commented); }
|
|
526
535
|
.rv-btn.approve:disabled, .rv-btn.comment:disabled { color: white; opacity: 0.45; }
|
|
536
|
+
/* Approved ✓ (ReviewSpec decision 1, the owner's decision of 2026-10-20): the approval that stands,
|
|
537
|
+
no longer a call to act — its colour's tint, ruled in it — and under the pointer or the keyboard's
|
|
538
|
+
focus what a click does, Withdraw approval, in the colour of taking back; the two words in one
|
|
539
|
+
cell, so that the button keeps its width as they change */
|
|
540
|
+
.rv-btn.approve.on { display: inline-grid; color: var(--rv-approved); background: color-mix(in srgb, var(--rv-approved) 13%, var(--surface-solid)); border-color: color-mix(in srgb, var(--rv-approved) 55%, transparent); font-weight: 600; }
|
|
541
|
+
.rv-btn.approve.on > span { grid-area: 1 / 1; text-align: center; }
|
|
542
|
+
.rv-btn.approve.on .rv-undo { visibility: hidden; }
|
|
543
|
+
.rv-btn.approve.on:is(:hover, :focus-visible) { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface-solid)); border-color: color-mix(in srgb, var(--bad) 50%, transparent); filter: none; }
|
|
544
|
+
.rv-btn.approve.on:is(:hover, :focus-visible) .rv-is { visibility: hidden; }
|
|
545
|
+
.rv-btn.approve.on:is(:hover, :focus-visible) .rv-undo { visibility: visible; }
|
|
546
|
+
.rv-btn.approve.on:focus-visible { outline-color: var(--bad); }
|
|
527
547
|
.rv-btn.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
|
|
528
548
|
.rv-tgt { align-self: flex-start; }
|
|
529
549
|
.rv-tag { font-size: 12px; color: var(--accent); }
|
|
@@ -652,6 +672,11 @@ button.o-trust:hover { color: var(--accent); background: var(--code-bg); }
|
|
|
652
672
|
.seg.mini { padding: 2px; border-radius: 8px; }
|
|
653
673
|
.seg.mini button { padding: 2px 8px; border-radius: 6px; font-size: 11.5px; }
|
|
654
674
|
.q-note { font-size: 11.5px; margin: -2px 0 6px; }
|
|
675
|
+
/* a target's list kept to the reader's own review (the owner's decision of 2026-10-20): beside the
|
|
676
|
+
order's switch, in its style, each with how many it keeps */
|
|
677
|
+
.q-own { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; font-size: 11.5px; }
|
|
678
|
+
.q-own-n { color: var(--text-3); font-variant-numeric: tabular-nums; }
|
|
679
|
+
.q-own .on .q-own-n { color: inherit; }
|
|
655
680
|
.q-row .q-n { display: inline-block; min-width: 2.2em; margin-right: 6px; text-align: right; color: var(--text-3); font-variant-numeric: tabular-nums; }
|
|
656
681
|
/* every row of the queue has its dot, so that the numbers line up: an open one for none yet */
|
|
657
682
|
.q-row.rv-none::before {
|
|
@@ -750,6 +775,18 @@ button.o-trust:hover { color: var(--accent); background: var(--code-bg); }
|
|
|
750
775
|
own indentation (--in, in characters) and four characters more, so that they read as the
|
|
751
776
|
same line going on; its first line starts where it would anyway */
|
|
752
777
|
.sw-win .ln { display: block; padding-left: calc((var(--in, 0) + 4) * 1ch); text-indent: calc((var(--in, 0) + 4) * -1ch); }
|
|
778
|
+
/* the gutter (web/src/gutter.ts; the owner's decision of 2026-10-20): the file's own line numbers,
|
|
779
|
+
muted, beside the code and the context, room made for the digits of the code's last line (--gw).
|
|
780
|
+
Each number is drawn from its line's data-n at the start of the line's first row, outside the
|
|
781
|
+
text: nothing selects, copies or quotes it, and the positions Lean is asked at count in the text
|
|
782
|
+
alone. A wrapped line's continuations hang as before, past the gutter. */
|
|
783
|
+
.sw-ctx, .sw-body pre.src { --gut-digit: 6.6px; --gut-pad: 14px; --gut: calc(var(--gw, 0) * var(--gut-digit) + var(--gut-pad)); }
|
|
784
|
+
.sw-win .sw-ctx .ln, .sw-win .sw-body pre.src .ln { padding-left: calc(var(--gut) + (var(--in, 0) + 4) * 1ch); }
|
|
785
|
+
.sw-win .sw-ctx .ln::before, .sw-win .sw-body pre.src .ln::before {
|
|
786
|
+
content: attr(data-n); display: inline-block; box-sizing: border-box; width: var(--gut); margin-left: calc(-1 * var(--gut));
|
|
787
|
+
padding-right: var(--gut-pad); text-align: right; text-indent: 0; white-space: nowrap; font: 11px/1 var(--mono);
|
|
788
|
+
font-variant-numeric: tabular-nums; color: var(--text-3); user-select: none; -webkit-user-select: none;
|
|
789
|
+
}
|
|
753
790
|
.sw-none { color: var(--text-2); font-size: 13px; padding: 8px 0; }
|
|
754
791
|
.sw-review { border-top: 1px solid var(--line); padding: 10px 16px 12px; }
|
|
755
792
|
.sw-review .sec { margin-top: 0; }
|
|
@@ -958,6 +995,19 @@ button.o-trust:hover { color: var(--accent); background: var(--code-bg); }
|
|
|
958
995
|
/* a private reader (CollabSpec decision 8): their dot hollow, and an eye struck through */
|
|
959
996
|
.who.private::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--me, var(--text-3)); }
|
|
960
997
|
.who-hidden { margin-left: 6px; vertical-align: -2px; color: var(--text-2); }
|
|
998
|
+
/* who follows the reader (the owner's decision of 2026-10-20): a mark after the name, with how many;
|
|
999
|
+
the name gives way to it, never the mark */
|
|
1000
|
+
#who { display: inline-flex; align-items: center; }
|
|
1001
|
+
#who::before { flex: none; }
|
|
1002
|
+
.who-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
1003
|
+
#who > .vf, #who > .who-hidden { flex: none; }
|
|
1004
|
+
.who-fol {
|
|
1005
|
+
flex: none; display: inline-flex; align-items: center; gap: 2px; margin-left: 7px; padding: 0 6px 0 4px; height: 18px;
|
|
1006
|
+
border-radius: 9px; background: color-mix(in srgb, var(--me, var(--accent)) 16%, transparent); color: var(--me, var(--accent));
|
|
1007
|
+
font: 600 11px/1 var(--font);
|
|
1008
|
+
}
|
|
1009
|
+
.who-fol svg { flex: none; }
|
|
1010
|
+
.wm-fol { padding-top: 0; color: var(--text); line-height: 1.4; }
|
|
961
1011
|
/* the menu under the name (web/src/whomenu.ts) */
|
|
962
1012
|
.who-wrap { position: relative; display: flex; min-width: 0; }
|
|
963
1013
|
.who-wrap:has(> #who[hidden]) { display: none; }
|
|
@@ -1089,8 +1139,9 @@ button.o-trust:hover { color: var(--accent); background: var(--code-bg); }
|
|
|
1089
1139
|
}
|
|
1090
1140
|
#peer-menu[hidden] { display: none; }
|
|
1091
1141
|
/* over the Export window and the artwork's panel too: following someone, or no longer, is the
|
|
1092
|
-
reader's own way out wherever they are (CollabSpec, "What following leaves")
|
|
1093
|
-
|
|
1142
|
+
reader's own way out wherever they are (CollabSpec, "What following leaves"); the name's menu too,
|
|
1143
|
+
which says who follows the reader */
|
|
1144
|
+
#bar:has(#peer-menu:not([hidden]), #who-menu:not([hidden])) { z-index: 42; }
|
|
1094
1145
|
.pm-who { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; padding: 6px 10px 4px; }
|
|
1095
1146
|
.pm-dot { width: 9px; height: 9px; border-radius: 50%; }
|
|
1096
1147
|
.pm-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
@@ -1109,6 +1160,43 @@ button.o-trust:hover { color: var(--accent); background: var(--code-bg); }
|
|
|
1109
1160
|
position: absolute; left: -5px; top: -5px; display: grid; place-items: center; width: 15px; height: 15px;
|
|
1110
1161
|
border-radius: 50%; color: #fff; box-shadow: 0 0 0 1.5px var(--surface-solid); font: 700 9px/1 var(--font);
|
|
1111
1162
|
}
|
|
1163
|
+
/* the pointers of the page's room (the owner's decisions of 2026-10-20; web/src/pointers.ts): over the
|
|
1164
|
+
windows, the panels and the Export window, under what asks the reader something; every press goes
|
|
1165
|
+
through but a mark's at an edge */
|
|
1166
|
+
#pointers { position: fixed; inset: 0; z-index: 43; pointer-events: none; overflow: hidden; }
|
|
1167
|
+
.ptr { position: absolute; left: 0; top: 0; transition: opacity 0.4s; will-change: transform; }
|
|
1168
|
+
.ptr[hidden], .ptr-edge[hidden], .ptr-sel[hidden] { display: none; }
|
|
1169
|
+
.ptr svg { display: block; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.35)); }
|
|
1170
|
+
.ptr-who {
|
|
1171
|
+
position: absolute; left: 13px; top: 15px; padding: 1px 6px; border-radius: 8px; background: var(--c); color: #fff;
|
|
1172
|
+
font: 600 10.5px/15px var(--font); white-space: nowrap; box-shadow: 0 0 0 1.5px var(--surface-solid);
|
|
1173
|
+
}
|
|
1174
|
+
.ptr-sel { position: absolute; background: color-mix(in srgb, var(--c) 26%, transparent); border-radius: 2px; box-shadow: 0 1.5px 0 0 var(--c); }
|
|
1175
|
+
.ptr-edge {
|
|
1176
|
+
position: absolute; transform: translate(-50%, -50%); pointer-events: auto; padding: 2px 8px; border: 0; border-radius: 10px;
|
|
1177
|
+
background: var(--c); color: #fff; font: 600 11px/16px var(--font); white-space: nowrap; cursor: pointer; opacity: 0.92;
|
|
1178
|
+
box-shadow: 0 0 0 1.5px var(--surface-solid), var(--shadow-lg);
|
|
1179
|
+
}
|
|
1180
|
+
.ptr-edge.inert { pointer-events: none; cursor: default; }
|
|
1181
|
+
.ptr-edge:hover { opacity: 1; }
|
|
1182
|
+
.ptr-ripple {
|
|
1183
|
+
position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--c);
|
|
1184
|
+
background: color-mix(in srgb, var(--c) 18%, transparent); animation: ptr-ripple 0.8s ease-out forwards;
|
|
1185
|
+
}
|
|
1186
|
+
@keyframes ptr-ripple { from { opacity: 0.9; scale: 0.3; } to { opacity: 0; scale: 1.6; } }
|
|
1187
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1188
|
+
/* a still mark that fades */
|
|
1189
|
+
.ptr-ripple { animation: ptr-fade 0.9s ease-out forwards; }
|
|
1190
|
+
}
|
|
1191
|
+
@keyframes ptr-fade { from { opacity: 0.9; } to { opacity: 0; } }
|
|
1192
|
+
/* someone following the reader (the owner's decision of 2026-10-20): the corner the others leave, in
|
|
1193
|
+
the reader's colour */
|
|
1194
|
+
.peer.follows { position: relative; }
|
|
1195
|
+
.peer-fol {
|
|
1196
|
+
position: absolute; left: -5px; bottom: -5px; display: grid; place-items: center; width: 15px; height: 15px;
|
|
1197
|
+
border-radius: 50%; background: var(--me); color: #fff; box-shadow: 0 0 0 1.5px var(--surface-solid);
|
|
1198
|
+
}
|
|
1199
|
+
.peer-fol svg { width: 10px; height: 10px; }
|
|
1112
1200
|
.peer-ask.ask-follow { background: var(--st-ok); }
|
|
1113
1201
|
.peer-ask.ask-decline { background: var(--bad); }
|
|
1114
1202
|
.peer-ask.ask-timeout { background: var(--text-3); }
|
|
@@ -1954,12 +2042,28 @@ details.lf-archived > summary { cursor: pointer; }
|
|
|
1954
2042
|
.sw-print-h { color: var(--text-3); font-size: 12px; margin-bottom: 6px; font-family: var(--mono, ui-monospace, monospace); }
|
|
1955
2043
|
.p-decl { font-family: var(--mono); font-size: 11.5px; cursor: help; }
|
|
1956
2044
|
/* the context a declaration is written in, above its code (shared/context.ts) */
|
|
1957
|
-
.sw-ctx { margin: 0 0 10px; padding: 0 0 8px;
|
|
2045
|
+
.sw-ctx { position: relative; margin: 0 0 10px; padding: 0 0 8px; --gut-break: color-mix(in srgb, var(--text-3) 60%, transparent); }
|
|
1958
2046
|
.sw-ctx .code { font: 11.5px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; background: transparent; padding: 0; margin: 0; border-radius: 0; }
|
|
1959
|
-
.sw-ctx-l {
|
|
1960
|
-
.sw-ctx-l.
|
|
2047
|
+
.sw-ctx-l { position: relative; }
|
|
2048
|
+
.sw-ctx-l > .ln { opacity: 0.55; }
|
|
2049
|
+
.sw-ctx-l.used > .ln { opacity: 0.95; }
|
|
2050
|
+
/* a variable it uses: a bar between the line's number and its text */
|
|
2051
|
+
.sw-ctx-l.used::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--gut) - var(--gut-pad) / 2 - 1px); width: 2px; background: var(--accent); }
|
|
1961
2052
|
.sw-ctx:not(.open) .sw-ctx-l.fold { display: none; }
|
|
1962
|
-
.sw-ctx-more { font-size: 11.5px; margin
|
|
2053
|
+
.sw-ctx-more { font-size: 11.5px; margin: 2px 0 0 var(--gut); }
|
|
2054
|
+
/* where lines are left out between two rows of the gutter, a break: a little room, a dashed rule
|
|
2055
|
+
across the gutter in it — as the context shows whole, and folded. Under the context, the rule
|
|
2056
|
+
between it and the code crosses the gutter, as a break, only where the code does not follow its
|
|
2057
|
+
last line. A line on the line before's (the elaborator's context gives each binder of a
|
|
2058
|
+
`variable` apart) shows no number again. */
|
|
2059
|
+
.sw-ctx.open .sw-ctx-l.gap, .sw-ctx:not(.open) .sw-ctx-l.gap-f { margin-top: 7px; }
|
|
2060
|
+
.sw-ctx.open .sw-ctx-l.gap::before, .sw-ctx:not(.open) .sw-ctx-l.gap-f::before, .sw-ctx.open.cut::before, .sw-ctx:not(.open).cut-f::before {
|
|
2061
|
+
content: ""; position: absolute; left: 0; width: calc(var(--gut) - var(--gut-pad) / 2); border-top: 1px dashed var(--gut-break);
|
|
2062
|
+
}
|
|
2063
|
+
.sw-ctx-l::before { top: -4px; }
|
|
2064
|
+
.sw-ctx::before { bottom: 0; }
|
|
2065
|
+
.sw-ctx.open .sw-ctx-l.again .ln::before, .sw-ctx:not(.open) .sw-ctx-l.again-f .ln::before { visibility: hidden; }
|
|
2066
|
+
.sw-ctx::after { content: ""; position: absolute; left: var(--gut); right: 0; bottom: 0; border-bottom: 1px dashed var(--line); }
|
|
1963
2067
|
.sw-gen-row { margin: 4px 0; }
|
|
1964
2068
|
.sw-gen-row pre.code { margin: 4px 0 10px; }
|
|
1965
2069
|
/* what Lean's #print says wraps as the code does */
|
|
@@ -2577,6 +2681,9 @@ kbd {
|
|
|
2577
2681
|
.lg-swatch.lg-kind {
|
|
2578
2682
|
background: conic-gradient(var(--k-def) 0 20%, var(--k-structure) 0 40%, var(--k-instance) 0 60%, var(--k-theorem) 0 80%, var(--k-axiom) 0);
|
|
2579
2683
|
}
|
|
2684
|
+
/* Mine where it has nothing to show (a reader without a name): what is not yet reviewed, ringed in
|
|
2685
|
+
approved's colour; else, as Status, a pie of the review */
|
|
2686
|
+
.lg-swatch.lg-mine { background: var(--status-unreviewed); box-shadow: inset 0 0 0 1.5px var(--status-approved); }
|
|
2580
2687
|
.lg-chip-n { color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 11.5px; }
|
|
2581
2688
|
.lg-chev { color: var(--text-3); font-size: 10px; }
|
|
2582
2689
|
.lg-card {
|
|
@@ -2594,6 +2701,9 @@ kbd {
|
|
|
2594
2701
|
.lg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2595
2702
|
.lg-n { color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 11.5px; }
|
|
2596
2703
|
.lg-row.none .lg-n { color: var(--text-3); }
|
|
2704
|
+
/* by one's own review (Mine): whose it is, or that there is nobody's yet */
|
|
2705
|
+
.lg-mine { color: var(--text-2); font-size: 11.5px; line-height: 1.35; }
|
|
2706
|
+
.lg-mine.lg-none { color: var(--text); padding: 5px 7px; border-radius: 8px; background: var(--code-bg); }
|
|
2597
2707
|
/* by status, the board's progress, in the scheme's own colours */
|
|
2598
2708
|
.lg-prog { display: flex; flex-direction: column; gap: 3px; color: var(--text-2); font-size: 11.5px; }
|
|
2599
2709
|
.lg-prog .rv-bar i.ok { background: var(--status-approved); }
|
|
@@ -2801,6 +2911,7 @@ span.tm-row { color: var(--text-2); cursor: default; }
|
|
|
2801
2911
|
.more-item svg { flex: none; width: 18px; height: 18px; color: var(--text-2); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
|
|
2802
2912
|
.more-item .act-badge, .more-item .talk-at { position: static; margin-left: auto; box-shadow: none; }
|
|
2803
2913
|
.more-item .act-badge + .talk-at { margin-left: 4px; }
|
|
2914
|
+
.more-item .more-fol { margin-left: auto; padding: 2px 8px; border-radius: 9px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font: 600 12px var(--font); white-space: nowrap; }
|
|
2804
2915
|
/* the modes, at the top of ⋯: each with what a tap selects under its name, the one in use ticked */
|
|
2805
2916
|
#more-pop { max-height: calc(100dvh - 70px); overflow-y: auto; }
|
|
2806
2917
|
.more-h { padding: 6px 12px 2px; font-size: 12px; font-weight: 600; color: var(--text-2); }
|
|
@@ -2897,6 +3008,9 @@ span.tm-row { color: var(--text-2); cursor: default; }
|
|
|
2897
3008
|
border-radius: 0 !important; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); z-index: 48;
|
|
2898
3009
|
}
|
|
2899
3010
|
.sw-win .fl-rz, .sw-ns, .sw-loc, .sw-acts [data-sw-collapse], .sw-pin { display: none !important; }
|
|
3011
|
+
/* its gutter narrower: smaller numbers, closer to the code */
|
|
3012
|
+
.sw-ctx, .sw-body pre.src { --gut-digit: 6px; --gut-pad: 9px; }
|
|
3013
|
+
.sw-win .sw-ctx .ln::before, .sw-win .sw-body pre.src .ln::before { font-size: 10px; }
|
|
2900
3014
|
/* the menu: no keys beside its items */
|
|
2901
3015
|
#ctxmenu .cm-key { display: none; }
|
|
2902
3016
|
/* the tree in the drawer: a row a finger can hit, an arrow wide enough to open or fold a level;
|
package/docs/agent-api/advice.md
CHANGED
|
@@ -15,7 +15,10 @@ Advice (one or many at once), the comment format, and a pre-review's steps.
|
|
|
15
15
|
as written (format below).
|
|
16
16
|
- Judge what a declaration says, never a proof: for `theorem main : Claim n`, advise on `Claim`,
|
|
17
17
|
and on the theorem whether it states the claim as it should.
|
|
18
|
-
- Your later opinion on a declaration replaces your earlier one (all stay in the file).
|
|
18
|
+
- Your later opinion on a declaration replaces your earlier one (all stay in the file). An approval
|
|
19
|
+
of the version your advice approves already records nothing, a comment with it neither:
|
|
20
|
+
`{ok, unchanged: true, note}` (`POST opinions`: counted in `unchanged`); once the declaration
|
|
21
|
+
changed, approving again is new.
|
|
19
22
|
- `judged`: `source` (its context, a blank line, the source, as `GET source` gives them:
|
|
20
23
|
[reading](reading.md)), or `statement` where there is no source.
|
|
21
24
|
- A folded name is advised as its declaration: `recorded.name` is that, with `asked`, `foldedInto`.
|
|
@@ -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":
|
|
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 `
|
|
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.
|
|
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
|
|
package/docs/agent-api/views.md
CHANGED
|
@@ -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`;
|
|
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
|