@louisultra/dsh-verymath 0.5.1 → 0.7.1

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/CHANGELOG.md CHANGED
@@ -3,16 +3,98 @@
3
3
  All notable changes to this project are documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
 
6
- ## [0.5.1] - 2026-11-11
6
+ ## [0.7.1] - 2026-11-11
7
7
 
8
- Re-release of 0.5.0 with no functional change. The 0.5.0 publish was accepted
9
- into npm's staging area and never became visible on the registry (`GET
10
- /@louisultra/dsh-verymath/0.5.0` → 404, `dist-tags.latest` stayed on 0.4.0), and
11
- re-publishing the same version was refused with `409 Cannot publish over
12
- previously staged version`. Rather than wait on a stuck staging entry, the
13
- version is bumped and published again.
8
+ ### Fixed
9
+
10
+ - **The panel and the tools could disagree about the same machine.** The
11
+ environment tab spawned a bare `sage`, while `verymath_sage_check` resolved it
12
+ through the conda environment directories — so a machine with
13
+ `~/.verymath/miniforge/envs/sage` showed "SageMath missing" in the panel and
14
+ "available" in the tool. Executable discovery now lives in `core/exec.ts` and
15
+ both surfaces use it; `tool` re-exports the same functions for compatibility.
16
+ - Panel writes used `writeFile`, which truncates before writing: a concurrent
17
+ reader (the panel polling, or a chat tool call landing mid-write) could see a
18
+ half-written document and report "not a valid glossary". Writes now go through a
19
+ sibling temp file plus `rename`.
20
+ - The environment probe ran its seven checks sequentially, so the tab could sit on
21
+ "probing…" for up to twenty seconds and read as a hang. The independent probes
22
+ now run concurrently.
23
+ - The read route and the write routes returned two different `stats` shapes; both
24
+ now use one `glossaryStats`, so the panel's counters do not jump after an edit.
25
+
26
+ ## [0.7.0] - 2026-11-11
27
+
28
+ ### Added
29
+
30
+ - **The glossary tab is an editor, not a viewer.** Editing a translation was the
31
+ one thing the panel could do better than the chat, and 0.6.0 could only read.
32
+ Per term you can now edit `cn`/`pos`/`field`/`source`/example, add a term, or
33
+ delete a row — with the same rules the tool enforces: a row is addressed by
34
+ `term_id` for corrections, a new translation of an existing English term
35
+ becomes an `en__N` alias row instead of overwriting, ambiguous or unknown
36
+ targets are refused with the core's own message, and a delete re-sorts with
37
+ contiguous `idx`. Writes go through `/api/verymath/glossary/{upsert,delete}`,
38
+ are confined to the workspace, and are serialized per document so two quick
39
+ edits cannot drop one another.
40
+ - Coverage gaps became a to-do list: the tab reports how many terms lack an
41
+ example sentence or a subfield and names them, instead of only counting.
42
+ - **The dependency graph is interactive.** The route now returns laid-out
43
+ coordinates and edges instead of a pre-rendered SVG string, and the client
44
+ draws it with real elements: clicking a node shows its statement, in/out
45
+ degree, whether it is a hub or supports a main theorem, and its immediate
46
+ relations; clicking again clears it. This also removes the panel's only use of
47
+ `dangerouslySetInnerHTML`.
48
+ - The environment tab gained copy-to-clipboard for each install hint and a
49
+ one-click Markdown report of the whole probe result.
50
+
51
+ ### Changed
52
+
53
+ - `pyrightconfig.json` excludes `skills/`: every Python file in this package is
54
+ vendored from upstream and recorded verbatim in `UPSTREAM.json`, so type
55
+ checking it reports upstream's own `openpyxl` stub complaints and invites edits
56
+ that would break provenance. The scripts are exercised by the upstream suite
57
+ (19 tests) and by real runs, not by pyright.
58
+
59
+ ## [0.6.0] - 2026-11-11
60
+
61
+ ### Added
14
62
 
15
- ## [0.5.0] - 2026-11-11
63
+ - **The panel is a real panel.** 0.5.0 shipped the sidebar entry with a static
64
+ list of tool names — an entry that proved the wiring, not a deliverable. This
65
+ release replaces it with four tabs backed by host routes that run the same core
66
+ code as the tools:
67
+ - **环境** — probes the local toolchain for real (Python 3, PyYAML, latexmk,
68
+ xelatex, the OSQP stack, SageMath, Lean) and shows, per row, what the
69
+ capability unlocks, the detected version, or the install command. A readiness
70
+ count answers "will this work on my machine" without trying a task first.
71
+ - **术语库** — picks any `glossary*.json` in the workspace (bounded scan), shows
72
+ term/example/alias/subfield counts, and searches by English, Chinese,
73
+ `term_id` or subfield with the same matching order the tool uses, including
74
+ example sentences for disambiguation.
75
+ - **论文图** — picks any `*_structure.json`, renders the theorem dependency
76
+ graph as an inline SVG (layered by the bottom-up reproduction order, coloured
77
+ by entity kind, thicker border for shared hubs), and reports topology:
78
+ hubs, cycles, isolated nodes, both reading directions, per-entity in/out
79
+ degree, plus a focus box that shows one theorem's transitive closure and
80
+ reading layers.
81
+ - **技能** — the 16 bundled skills with their descriptions, read from the
82
+ package the same way the host skill registry reads them.
83
+ - `src/http.ts`: six `/api/verymath/*` routes (`env`, `glossaries`, `glossary`,
84
+ `structures`, `paper`, `skills`). Each is registered through
85
+ `connection.fetch.register` with an explicit `requestBody: 'buffered'`, and
86
+ every failure becomes structured JSON so the panel shows a sentence instead of
87
+ an empty 500. Paths are confined to the workspace; escaping paths are refused
88
+ with 400.
89
+ - The root entry now registers those routes via `ctx.inject(['connection'], …)`.
90
+ When a host has no connection service (headless, CLI) the panel half simply
91
+ degrades away — the tools and skills are unaffected.
92
+ - `tests/tool/http.spec.ts` (10 cases): every route the panel calls is registered
93
+ and returns its documented shape; workspace escape and non-glossary input are
94
+ client errors, not 500s; the paper route returns topology plus an SVG that
95
+ actually contains the entity labels.
96
+
97
+ @@## [0.5.0] - 2026-11-11
16
98
 
17
99
  ### Added
18
100