@louisultra/dsh-verymath 0.5.1 → 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.
- package/CHANGELOG.md +70 -8
- package/lib/client.js +620 -66
- package/lib/core/glossary.d.ts +18 -0
- package/lib/core/glossary.js +20 -0
- package/lib/core/index.d.ts +2 -2
- package/lib/core/index.js +1 -1
- package/lib/http.d.ts +29 -0
- package/lib/http.js +635 -0
- package/lib/index.d.ts +14 -11
- package/lib/index.js +50 -8
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,16 +3,78 @@
|
|
|
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.
|
|
6
|
+
## [0.7.0] - 2026-11-11
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- **The glossary tab is an editor, not a viewer.** Editing a translation was the
|
|
11
|
+
one thing the panel could do better than the chat, and 0.6.0 could only read.
|
|
12
|
+
Per term you can now edit `cn`/`pos`/`field`/`source`/example, add a term, or
|
|
13
|
+
delete a row — with the same rules the tool enforces: a row is addressed by
|
|
14
|
+
`term_id` for corrections, a new translation of an existing English term
|
|
15
|
+
becomes an `en__N` alias row instead of overwriting, ambiguous or unknown
|
|
16
|
+
targets are refused with the core's own message, and a delete re-sorts with
|
|
17
|
+
contiguous `idx`. Writes go through `/api/verymath/glossary/{upsert,delete}`,
|
|
18
|
+
are confined to the workspace, and are serialized per document so two quick
|
|
19
|
+
edits cannot drop one another.
|
|
20
|
+
- Coverage gaps became a to-do list: the tab reports how many terms lack an
|
|
21
|
+
example sentence or a subfield and names them, instead of only counting.
|
|
22
|
+
- **The dependency graph is interactive.** The route now returns laid-out
|
|
23
|
+
coordinates and edges instead of a pre-rendered SVG string, and the client
|
|
24
|
+
draws it with real elements: clicking a node shows its statement, in/out
|
|
25
|
+
degree, whether it is a hub or supports a main theorem, and its immediate
|
|
26
|
+
relations; clicking again clears it. This also removes the panel's only use of
|
|
27
|
+
`dangerouslySetInnerHTML`.
|
|
28
|
+
- The environment tab gained copy-to-clipboard for each install hint and a
|
|
29
|
+
one-click Markdown report of the whole probe result.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- `pyrightconfig.json` excludes `skills/`: every Python file in this package is
|
|
34
|
+
vendored from upstream and recorded verbatim in `UPSTREAM.json`, so type
|
|
35
|
+
checking it reports upstream's own `openpyxl` stub complaints and invites edits
|
|
36
|
+
that would break provenance. The scripts are exercised by the upstream suite
|
|
37
|
+
(19 tests) and by real runs, not by pyright.
|
|
38
|
+
|
|
39
|
+
## [0.6.0] - 2026-11-11
|
|
40
|
+
|
|
41
|
+
### Added
|
|
14
42
|
|
|
15
|
-
|
|
43
|
+
- **The panel is a real panel.** 0.5.0 shipped the sidebar entry with a static
|
|
44
|
+
list of tool names — an entry that proved the wiring, not a deliverable. This
|
|
45
|
+
release replaces it with four tabs backed by host routes that run the same core
|
|
46
|
+
code as the tools:
|
|
47
|
+
- **环境** — probes the local toolchain for real (Python 3, PyYAML, latexmk,
|
|
48
|
+
xelatex, the OSQP stack, SageMath, Lean) and shows, per row, what the
|
|
49
|
+
capability unlocks, the detected version, or the install command. A readiness
|
|
50
|
+
count answers "will this work on my machine" without trying a task first.
|
|
51
|
+
- **术语库** — picks any `glossary*.json` in the workspace (bounded scan), shows
|
|
52
|
+
term/example/alias/subfield counts, and searches by English, Chinese,
|
|
53
|
+
`term_id` or subfield with the same matching order the tool uses, including
|
|
54
|
+
example sentences for disambiguation.
|
|
55
|
+
- **论文图** — picks any `*_structure.json`, renders the theorem dependency
|
|
56
|
+
graph as an inline SVG (layered by the bottom-up reproduction order, coloured
|
|
57
|
+
by entity kind, thicker border for shared hubs), and reports topology:
|
|
58
|
+
hubs, cycles, isolated nodes, both reading directions, per-entity in/out
|
|
59
|
+
degree, plus a focus box that shows one theorem's transitive closure and
|
|
60
|
+
reading layers.
|
|
61
|
+
- **技能** — the 16 bundled skills with their descriptions, read from the
|
|
62
|
+
package the same way the host skill registry reads them.
|
|
63
|
+
- `src/http.ts`: six `/api/verymath/*` routes (`env`, `glossaries`, `glossary`,
|
|
64
|
+
`structures`, `paper`, `skills`). Each is registered through
|
|
65
|
+
`connection.fetch.register` with an explicit `requestBody: 'buffered'`, and
|
|
66
|
+
every failure becomes structured JSON so the panel shows a sentence instead of
|
|
67
|
+
an empty 500. Paths are confined to the workspace; escaping paths are refused
|
|
68
|
+
with 400.
|
|
69
|
+
- The root entry now registers those routes via `ctx.inject(['connection'], …)`.
|
|
70
|
+
When a host has no connection service (headless, CLI) the panel half simply
|
|
71
|
+
degrades away — the tools and skills are unaffected.
|
|
72
|
+
- `tests/tool/http.spec.ts` (10 cases): every route the panel calls is registered
|
|
73
|
+
and returns its documented shape; workspace escape and non-glossary input are
|
|
74
|
+
client errors, not 500s; the paper route returns topology plus an SVG that
|
|
75
|
+
actually contains the entity labels.
|
|
76
|
+
|
|
77
|
+
@@## [0.5.0] - 2026-11-11
|
|
16
78
|
|
|
17
79
|
### Added
|
|
18
80
|
|