dsh-vibe-math 2.6.0 → 2.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/README.en.md +161 -389
- package/README.md +161 -390
- package/cordis.patch.yml +62 -14
- package/docs/AUDIT-CHECKLIST.md +2 -2
- package/docs/final-paper.md +1 -0
- package/docs/formal-verification.md +184 -29
- package/docs/math-computation.md +163 -0
- package/docs/release-notes/RELEASE-NOTES-2.7.0.en.md +151 -0
- package/docs/release-notes/RELEASE-NOTES-2.7.0.md +115 -0
- package/docs/release-notes/RELEASE-NOTES-2.7.1.en.md +86 -0
- package/docs/release-notes/RELEASE-NOTES-2.7.1.md +86 -0
- package/docs/test-timing.md +24 -12
- package/installer.js +7 -4
- package/package.json +21 -3
- package/prompt-corpus-persona/persona-corpus.json +12 -12
- package/prompt-corpus-persona/persona-corpus.md +128 -32
- package/prompt-corpus-v2/formal-verify-v2.json +182 -92
- package/prompt-corpus-v2/formal-verify-v2.md +2379 -55
- package/prompt-corpus-v3/formal-verify-v3.json +215 -53
- package/prompt-corpus-v3/formal-verify-v3.md +2147 -22
- package/prompt-corpus-v4/formal-verify-v4.json +14 -14
- package/prompt-corpus-v4/formal-verify-v4.md +267 -14
- package/prompt-corpus-v5/prompt-corpus-v5.json +62 -62
- package/prompt-corpus-v5/prompt-corpus-v5.md +631 -3
- package/tests/audit-math-computation-contract.mjs +204 -0
- package/tests/audit-math-computation-parity.mjs +198 -0
- package/tests/audit-math-computation-sensitivity.mjs +231 -0
- package/tests/audit-persona-sensitivity.mjs +4 -4
- package/tests/audit-persona-surface.test.mjs +38 -10
- package/tests/audit-v5-integrity.mjs +14 -0
- package/tests/e2e-v5-round2.test.mjs +459 -2
- package/tests/formal-verify-v2.test.mjs +362 -8
- package/tests/formal-verify-v3.test.mjs +355 -6
- package/tests/formal-verify-v4.test.mjs +295 -6
- package/tests/formal-verify-v5.test.mjs +9 -1
- package/tests/helpers/math-computation-fake-seam.mjs +163 -0
- package/tests/math-computation-shared.test.mjs +806 -0
- package/tests/prompt-v5-integrity.test.mjs +5 -5
- package/vibe-math-v2/agent.cordis.yml +22 -8
- package/vibe-math-v2/math-computation.js +1279 -0
- package/vibe-math-v2/math-engines.js +197 -0
- package/vibe-math-v2/vibe-math-v2.js +853 -40
- package/vibe-math-v2//345/256/236/347/216/260/346/226/271/346/241/210.md +6 -0
- package/vibe-math-v3/agent.cordis.yml +22 -8
- package/vibe-math-v3/math-computation.js +1279 -0
- package/vibe-math-v3/math-engines.js +197 -0
- package/vibe-math-v3/vibe-math-v3.js +844 -47
- package/vibe-math-v3//345/256/236/347/216/260/346/226/271/346/241/210.md +6 -0
- package/vibe-math-v4/agent.cordis.yml +38 -6
- package/vibe-math-v4/math-computation.js +1279 -0
- package/vibe-math-v4/math-engines.js +197 -0
- package/vibe-math-v4/vibe-math-v4.js +816 -31
- package/vibe-math-v4//345/256/236/347/216/260/346/226/271/346/241/210.md +6 -0
- package/vibe-math-v5/agent.cordis.yml +42 -6
- package/vibe-math-v5/math-computation.js +1279 -0
- package/vibe-math-v5/math-engines.js +197 -0
- package/vibe-math-v5/vibe-math-v5.js +1132 -37
- package/vibe-math-v5//345/256/236/347/216/260/346/226/271/346/241/210.md +83 -3
- package/vibe-math-v5//346/236/266/346/236/204/345/233/276.md +251 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# dsh-vibe-math 2.7.1 — 发布说明(中文)
|
|
2
|
+
|
|
3
|
+
> 上一版:2.7.0。本版是**补丁版**,两批改动一起发。**第一批(诚实性与安装口径)**:替代方案若改变精确性或结论强度必须声明;python 安装按**检测到的环境**分派 conda/mamba/uv/pip;R/Octave/Julia 的系统级作用域拒绝给出**每引擎理由**;**版本求解交给包管理器**,本工具只查存在。**第二批(首次真机端到端跑出来的七个缺陷)**:`probe` 回显请求的引擎、引擎发现新增 **DSH 自带运行时**、`cli` 逃生口的包预检改用它自己那个解释器、`mode:'code'` **真的把脚本传进去**(调用方 argv 自带程序槽时以调用方为准)、版本报真值、探针 argv 不含 shell 元字符、探测不再依赖项目目录已存在。既有参数默认值、数据格式与目录结构**未变**,DSH 支撑窗口不变,无需迁移。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 概览
|
|
8
|
+
|
|
9
|
+
- **替代必须声明**:新规则行(中/英)说明"替代方案改变精确性/结论强度时必须写明",进入四套预设的**两个 persona 文本块**、规则段与工具描述;缺引擎/缺包时明确给**替代方案或安装计划**,安装一律 `plan → planToken → confirm`。
|
|
10
|
+
- **python 包管理器分派**:`conda` / `mamba`(`-y -c conda-forge`)/ `uv`(`uv pip …`)/ **pip 回退**(`-m pip install --user`);按解释器**自身环境**检测,不猜;歧义时回退 pip 并在计划/消息/审计里标明**假设**。
|
|
11
|
+
- **系统级作用域有理由**:`system` 仍返回 `MATH_REFUSED` + `next.reason:'system-scope-unsupported'`,但消息现在说明**每个引擎为什么**(R→`R_LIBS_USER`、Octave→`share/packages`、Julia→`JULIA_DEPOT_PATH`,conda/mamba/uv 各自理由)。
|
|
12
|
+
- **版本约束口径**:接受 `名称` / `名称[extras]` / `名称<op>版本`;其余写法显式拒绝(新 reason `unsupported-version-syntax`)。**版本求解是包管理器的事**,本工具只按 base name 查存在、把规格原样透传。
|
|
13
|
+
- 随功能修掉一个真机缺陷:安装路径此前按**引擎名**解析解释器(`python`)而不是候选顺序(`python3`→`python`→`py`),会让 conda 检测在真机上失效。
|
|
14
|
+
|
|
15
|
+
## 变更
|
|
16
|
+
|
|
17
|
+
### 1. 替代方案的诚实性
|
|
18
|
+
|
|
19
|
+
- **规则**:当替代方案改变了**精确性或结论强度**时——精确符号解 → 数值近似、闭式解 → 采样/求积、改了精度/容差/假设、换了算法类——结论里**必须写明**,不得读起来像得到了原本(精确/所要求的)结果;拿不到精确结果就直说。
|
|
20
|
+
- **落点**(中/英各一条常量):`MATH_SUBSTITUTION_RULE_LINE` / `MATH_SUBSTITUTION_RULE_LINE_EN`,已并入 `MATH_RULE_LINES`/`_EN`(因此 `mathAvailabilityLine()` 自动携带),工具描述也加了同义句;**四套预设的两个 persona 文本块都逐字追加**(追加,不替换既有规则行)。
|
|
21
|
+
- **缺引擎/缺包**:仍然只报告,并明确给**用户自装指引**或**代理代装计划**;**安装一律先出计划、再由 `planToken` 确认**(token 绑定计划内容,内容变了即失效),默认 user 作用域,`system` 每次显式且不被记住。
|
|
22
|
+
|
|
23
|
+
### 2. Python 包管理器分派
|
|
24
|
+
|
|
25
|
+
`python` 的安装计划按**解释器自身环境**选择管理器,而不是固定 pip:
|
|
26
|
+
|
|
27
|
+
| 检测到的环境 | 计划里的命令 | 依据 |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| 解释器路径含 conda 标记(`/envs/`、`/conda`、`/miniconda*`、`/anaconda*`、`/mambaforge`、`/miniforge`)且 `conda` 可解析 | `conda install -y -c conda-forge <pkg>`(卸载 `conda remove -y <pkg>`) | 路径标记 + 可解析确认 |
|
|
30
|
+
| 同上但只有 `mamba` | `mamba install -y -c conda-forge <pkg>`(卸载 `mamba remove -y <pkg>`) | 同上 |
|
|
31
|
+
| `uv` 与解释器**同目录**(uv 管理的 venv) | `uv pip install <pkg>`(卸载 `uv pip uninstall <pkg>`) | 同目录才算 |
|
|
32
|
+
| 其它 | `python -m pip install --user <pkg>`(卸载 `python -m pip uninstall -y <pkg>`) | **文档化回退**,计划标 `managerAssumed` |
|
|
33
|
+
|
|
34
|
+
- **检测,不猜**:计划、返回消息与审计 JSON 都带 `manager` / `managerAssumed` / `managerWhy`;歧义时回退 pip 并明说"计划假设用 pip"。
|
|
35
|
+
- **install 与 uninstall 成对**:卸载命令来自同一个被选中的管理器(审计里带卸载模板;仍**没有**通用自动回滚)。
|
|
36
|
+
- **顺手修掉的真实缺陷**:安装路径此前用**引擎名**(`python`)解析解释器,而不是描述符的**候选顺序**(`python3`→`python`→`py`)——真机上 conda 的 `python3` 才是那个解释器,所以分派会看不到环境标记。现在与运行路径一致,按候选依次解析。
|
|
37
|
+
|
|
38
|
+
### 3. 每引擎系统级作用域策略
|
|
39
|
+
|
|
40
|
+
- R / Octave / Julia **只做用户级**,`scope:'system'` 返回 `MATH_REFUSED` + `next.reason:'system-scope-unsupported'`,消息里给出**该引擎的理由**:
|
|
41
|
+
- **R**:用户库是 `R_LIBS_USER`;系统级要写发行版包目录(需 root 或发行版包管理器)。
|
|
42
|
+
- **Octave**:`pkg install` 装进用户包目录;系统级要写 Octave 的 `share/packages`(需 root)。
|
|
43
|
+
- **Julia**:`Pkg.add` 装进当前活动环境 / 用户 depot(`JULIA_DEPOT_PATH`);"系统级"不是 Julia 的概念。
|
|
44
|
+
- **conda / mamba / uv** 同样没有系统模板,各自带理由;**python 走 pip 时仍保留真实的系统模板**(不带 `--user`),由每次调用显式确认。
|
|
45
|
+
|
|
46
|
+
### 4. 版本约束口径
|
|
47
|
+
|
|
48
|
+
- **接受的写法**:`名称`、`名称[extras]`、`名称<op>版本`,其中 `<op>` ∈ `==` `>=` `<=` `~=` `!=` `>` `<` `=`(pip 风格的 `numpy==1.2`、conda 风格的 `numpy=1.2`)。
|
|
49
|
+
- **拒绝的写法**:空格、`;`、`|`、`&`、`$`、反引号、`@`、括号等 shell 危险或管理器不认识的语法 ⇒ `MATH_INVALID_ARGUMENT` + `next.reason:'unsupported-version-syntax'`(**不会**把可疑字符串丢给 shell)。
|
|
50
|
+
- **分工**:**版本求解交给包管理器**——本工具只按 **base name** 探测与报缺,安装计划把规格**原样透传**,并在计划里带 `versionPolicy` 说明这一点。
|
|
51
|
+
- **词汇表**:`unsupported-version-syntax` 是新增的机读 reason;词汇表现共 **13 reason / 7 `next.kind` / 11 失败码**,在 `tool-schema.json#refusalVocabulary`、`docs/math-computation.md` §3 与 parity 守卫之间保持**集合相等**(守卫还要求每个 `reason:` 取值都是字符串字面量)。
|
|
52
|
+
|
|
53
|
+
### 5. 真机缺陷修复(一条根因、三个症状)
|
|
54
|
+
|
|
55
|
+
1. **`op:'probe'` 忽略请求的引擎**:响应里 `engine` 是 `null`(或"第一个允许的引擎"),失败路径总是指责 `params.mathEngines[0]`(python),于是 `probe{engine:'r'}` 回显 python 并让用户去装 python。现在解析并报告**请求的**引擎(名字/路径/版本);被请求且解析成功的引擎(包括 `cli`)也算可用,请求的引擎缺失时错误与指引都指向它。
|
|
56
|
+
2. **引擎发现漏掉 DSH 自带的运行时**:PATH 仍然优先;都没有时,若宿主声明了可选字段 `runtimeRoots` + `listDirAbs`,最后扫描 `<root>/dsh-runtimes/*/dependencies/<engine>/`——**树名通配**(从不写死 `dsh-primary-runtime`),且只接受描述符自己的候选名。找到的引擎会报**真实版本**,并且**不再给安装指引**(对已装的引擎给 winget 提示正是误导的来源)。
|
|
57
|
+
3. **`cli` 包预检忽略 `cli.command`**:通用 `cli` 描述符没有包探测,于是所有包看起来都缺、逃生口把自己堵死。现在按解析出的命令的**族**(`python*`/`Rscript`/`octave`/`julia`)用**那个解释器**探测;族不可识别时**跳过**预检并给出明确警告,而不是误报"缺包"。
|
|
58
|
+
4. **`mode:'code'` 从不传脚本**:`cli` 只拿到命令,于是 python 掉进 REPL(`exit=0`、stdout 空——读起来像成功)。现在 `mode:'code'`/`'file'` 会把归档脚本路径追加到 argv;**若调用方 argv 自带程序槽(`-c`/`-m`/`-e`/`--eval`/`--command`)则以调用方为准、不追加**(否则脚本会被当成多余参数)。回执记录 `cli.scriptAppended`,跳过时记录 `cli.scriptSkipped` 及原因。
|
|
59
|
+
5. **`engine.version` 是 `"unknown"`**:`cli` 现在用族描述符的**真实版本探测**取版本(族不可识别时仍是 `"unknown"`)。
|
|
60
|
+
6. **探针 argv 含 shell 元字符**:真实宿主对含 `|`(以及 `%`)的 argv 会返回**空 spawn**。所有探针代码改为不含元字符(每包一行 `名称 ok|missing`),解析器同时接受旧的 `名称:状态` 与新形态;python 仍是**每包一个 argv 项**。
|
|
61
|
+
7. **根因:探测的 cwd 在全新工作区不存在**。版本探测、包预检与许可探测用 `projectRoot()` 作 cwd,而全新会话里该目录还不存在,宿主对这种 spawn 返回 `spawned:true, exit:null`(**重试无用**:同 cwd 同结果)。这一条同时造成了"找到了却不可用"、误报"缺包"与 `version:"unknown"`。现在探测走**一定存在**的 cwd(`probeCwd`:可选宿主字段 → OS 临时目录 → 项目根);真正的 `run` 仍用项目根——它本来就会先写回执,写盘会创建目录树。
|
|
62
|
+
|
|
63
|
+
### 6. 新增两条永久守卫
|
|
64
|
+
|
|
65
|
+
- **§20 响应必须可 JSON 序列化**:诊断对象曾出现自引用的 `retryDiag`,导致 `JSON.stringify(response)` 抛 `Converting circular structure to JSON`,调用方**看不到任何结果**。现在诊断经 `jsonSafeDiag` 投影成纯字段,共享套件断言 **13 种响应**(`probe`/`run`/`receipt`/`install`,成功与失败,含重试后失败的 `retryDiag` 场景)都能序列化。
|
|
66
|
+
- **§21 fresh-root 仿真**:假 seam 模拟宿主("cwd 不存在 ⇒ `exit:null`",且 `writeText` 标记目录已创建),断言全新根上 `probe` 仍 `ok:true` 且版本是真值、没有任何探测报 `exit:null`、包预检照常运行。
|
|
67
|
+
|
|
68
|
+
### 7. 审查与验证
|
|
69
|
+
|
|
70
|
+
- **同一套纪律**:共享模块四份**字节一致**(`install-copies --check` ⇒ `COPIES OK`);`math-computation-shared` **278/0**、四套预设 **114/116/153/117**、`audit-math-computation-contract` **155/0**、`audit-math-computation-parity` **92/0**、`audit-math-computation-sensitivity` **22 探针 / 0 problems**、变异证明 **16 proved / 0 problems**(每一个都把**具名**断言打红);门禁 `TOTAL 65 PASS 65 FAIL 0`(**44 套件 + 21 探针**)。
|
|
71
|
+
- **真机证据(全新空工作区、第一个工具调用)**:`probe{engine:'python'}` ⇒ `ok:true`、版本 `3.12.14`、路径 `…/dsh-runtimes/dsh-primary-runtime/dependencies/python/python.exe`、无 `exit:null`;用 `cli` + 自带解释器 `run` 且 `packages:['numpy']` ⇒ `exit:0`、`stdout:"1.643935 -2.0"`(k=1..1000 的 Σ1/k² 与 det([[1,2],[3,4]]))、`packages.found.numpy:"present"`、`warnings:[]`、回执 6 个文件。
|
|
72
|
+
- **仍然成立的诚实边界**:引擎执行现在**已通过 `cli` 逃生口在 DSH 自带运行时上真机验证**(这是本项目唯一被证明的真实引擎路径——内置引擎仍只通过假 subprocess seam 覆盖);`session/follow` 的 token 级增量、多客户端与回合中 `cancel` **仍未验证**;宿主 `subprocess.spawn` **没有 policy 槽**,插件不能强制禁网/限权(需宿主 sandbox);Maple/MATLAB/Wolfram 的模板标 `VERIFY` 并提供 `mathEngineOverride`;**SageMath 属 P2**;两个对照实验只是 **run-book**,本说明**不含编造数字**。
|
|
73
|
+
|
|
74
|
+
## 兼容性
|
|
75
|
+
|
|
76
|
+
- 既有参数默认值、数据格式与目录结构**未变**;新增的只是规则文本、安装计划的分派逻辑与一个机读 reason,**无需迁移**。
|
|
77
|
+
- **行为变化仅限安装计划**:没有 conda/uv 标记的机器仍走 pip(与上一版一致);**conda/mamba/uv 环境现在会得到该管理器的命令**(这正是本版目的),卸载命令同样来自该管理器。
|
|
78
|
+
- `system` 作用域的返回码与 `next.reason` **未变**(只是消息更有信息量);python+pip 的系统模板仍在。
|
|
79
|
+
|
|
80
|
+
## 升级
|
|
81
|
+
|
|
82
|
+
- 直接升级即可,无需迁移。
|
|
83
|
+
- 若希望安装计划**总是用 pip**:在非 conda/uv 的解释器上运行(或指向系统 python);本工具不会"猜"管理器,只在解释器自身环境给出标记时才分派。
|
|
84
|
+
- **七个真机缺陷全部修复**(都来自首次真机端到端,且都在同一份字节上关闭):`probe` 对任何请求引擎都回显 `python`;DSH 自带运行时发现不到;`cli` 包预检忽略 `cli.command`;`mode:'code'` 从不传脚本;`engine.version` 是 `"unknown"`;探针 argv 含 `|`/`%`(真实宿主会以空 spawn 回应);探测用的 cwd 在**全新工作区还不存在**——**这一条是"找到了却不可用"和"误报缺包"的共同根因**。
|
|
85
|
+
- **新增两条永久守卫**:§20 **13 种响应必须可 JSON 序列化**的横切不变量;§21 **fresh-root 仿真**(cwd 不存在时宿主返回 `exit:null`)。
|
|
86
|
+
|
package/docs/test-timing.md
CHANGED
|
@@ -26,17 +26,20 @@ node tests/run-tests.mjs --json # 机器可读汇总(含 skippedN
|
|
|
26
26
|
|
|
27
27
|
### 1.1 随包发布 vs 仅仓库(`npm pack --dry-run --json`)
|
|
28
28
|
|
|
29
|
-
`package.json` 的 `files` 只发 `tests/` 的一个**子集**(发布物共
|
|
29
|
+
`package.json` 的 `files` 只发 `tests/` 的一个**子集**(发布物共 **119** 个文件,其中 `tests/` **23** 项),
|
|
30
30
|
所以安装用户跑 `node tests/run-tests.mjs` 得到的是子集的结果——runner 会把缺失的跳过项打印出来,
|
|
31
31
|
不会静默少跑:
|
|
32
32
|
|
|
33
|
-
- **随包(
|
|
33
|
+
- **随包(23 项)**:`run-tests.mjs`、`audit-formal-sensitivity.mjs`、`audit-persona-sensitivity.mjs`、
|
|
34
34
|
`audit-prompt-invariants.mjs`、`audit-spec-traceability.mjs`、`audit-v5-integrity.mjs`、
|
|
35
|
-
`audit-v5-sensitivity.mjs`、`selfdrive-v5.mjs
|
|
35
|
+
`audit-v5-sensitivity.mjs`、`selfdrive-v5.mjs`、`audit-math-computation-parity.mjs`、
|
|
36
|
+
`audit-math-computation-contract.mjs`、`audit-math-computation-sensitivity.mjs`、
|
|
37
|
+
`helpers/math-computation-fake-seam.mjs`;套件 **11** 个:`audit-installer-compat`、
|
|
36
38
|
`audit-installer-policy`、`audit-persona-surface`、`audit-preset-rows`、`e2e-v5-round2`、
|
|
37
|
-
`formal-verify-v2`、`formal-verify-v3`、`formal-verify-v4`、`formal-verify-v5`、`prompt-v5-integrity
|
|
38
|
-
-
|
|
39
|
-
|
|
39
|
+
`formal-verify-v2`、`formal-verify-v3`、`formal-verify-v4`、`formal-verify-v5`、`prompt-v5-integrity`、
|
|
40
|
+
`math-computation-shared`。
|
|
41
|
+
- **仅仓库(不发)**:其余 33 个套件(v2/v3/v4 的 e2e、`selfdrive-v3`/`v4`、v2/v3 修复探针、
|
|
42
|
+
`math-computation-v2|v3|v4|v5`、`audit-fuzz-helpers` 之外的若干 `audit-*`……)与 7 个脚本(`audit-fuzz-helpers`、
|
|
40
43
|
`audit-registration`、`audit-roundtrip-idempotence`、`audit-tool-exec`、
|
|
41
44
|
`audit-v3-registration-parity`、`selfdrive-v3`、`selfdrive-v4`)。
|
|
42
45
|
- 因此**完整门禁只能在开发检出里跑**;发布物里的子集是"用户可自查"的一部分,不是全部证据。
|
|
@@ -46,8 +49,8 @@ node tests/run-tests.mjs --json # 机器可读汇总(含 skippedN
|
|
|
46
49
|
|
|
47
50
|
| 脚本 | 串行(sum) | 并行(wall) | 实测输出 |
|
|
48
51
|
|---|---|---|---|
|
|
49
|
-
| `tests/run-tests.mjs`(**
|
|
50
|
-
| `tests/audit-formal-sensitivity.mjs`(49 探针,自带并发 4) |
|
|
52
|
+
| `tests/run-tests.mjs`(**65 项** = 44 套件 + 21 探针/变体) | ≈ 424 s | **≈ 121 s**(并发 4,speed-up x3.51) | `TOTAL 65 PASS 65 FAIL 0 (suites 44 · probes 21)`;实测 `wall 120.7s · sum 424.2s`,关键路径 = `e2e-v4-fixes`(≈ 98 s) |
|
|
53
|
+
| `tests/audit-formal-sensitivity.mjs`(49 探针,自带并发 4;v2 12 / v3 12 / v4 12 / v5 13) | ≈ 1035 s | **260.7 s**(实测,x3.97) | 关键路径 = v2/v3 的 `require` 探针(各 ≈75 s);全 49 条按预期变红、0 问题 |
|
|
51
54
|
| `tests/audit-v5-sensitivity.mjs`(39 探针,串行) | ≈ 101 s | — | 每条 = 一次被测套件重跑 |
|
|
52
55
|
| `tests/audit-persona-sensitivity.mjs`(16 探针) | ≈ 4.4 s | — | 本身很快,不需要并行 |
|
|
53
56
|
| `tests/audit-prompt-invariants.mjs`(157 条) | ≈ 1.9 s | — | 静态 |
|
|
@@ -63,10 +66,19 @@ node tests/run-tests.mjs --json # 机器可读汇总(含 skippedN
|
|
|
63
66
|
| `tests/v2-fix-probes.test.mjs` | ≈ 8.6 s | — | v2 的 flat 等权均值 / ≥2 名验证者 / runShell 失败分支(26 条) |
|
|
64
67
|
| `tests/v2-path-escape.test.mjs` | ≈ 2.2 s | — | 验证日志路径逃逸(7 条) |
|
|
65
68
|
| `tests/v2-tool-cap.test.mjs` | ≈ 0.4 s | — | 能力表来自真实组合、*MaxToolCalls 只是提示(10 条) |
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
| `tests/math-computation-v2.test.mjs` | ≈ 1.7 s | — | v2 接线:六参数/双注册层/回执/归档→编辑→重跑/跨会话隔离(含 mutant 说明在文件头) |
|
|
70
|
+
| `tests/math-computation-v3.test.mjs` | ≈ 1.7 s | — | v3 同上(dual-layer + `TOOL_DESC` 描述 parity) |
|
|
71
|
+
| `tests/math-computation-v4.test.mjs` | ≈ 2.5 s | — | v4:每会话一个模块实例 + 隔离断言 + `vibe_v4_set` 闭集 + 单点注册 |
|
|
72
|
+
| `tests/math-computation-v5.test.mjs` | ≈ 1.4 s | — | v5:闭集 `vibe_v5_set`、研究所根回执、会话隔离(7 个 mutant) |
|
|
73
|
+
| `tests/math-computation-shared.test.mjs` | ≈ 0.1 s | — | 共享模块契约(参数/失败码/argv/回执/归档/并发/override/路径守卫),走假 subprocess seam |
|
|
74
|
+
| `tests/audit-math-computation-parity.mjs` | ≈ 0.1 s | — | 四份副本字节一致 + canonical 一致 + 两条安装线 + 描述符不变式(44 条) |
|
|
75
|
+
| `tests/audit-math-computation-contract.mjs` | ≈ 0.2 s | — | 跨预设接线(含 set-schema **属性级**检查与 defaults 漂移检查) |
|
|
76
|
+
| `tests/audit-math-computation-sensitivity.mjs` | ≈ 25 s | — | 21 个模块级变异,每条都要求具名断言变红(控制组必须绿) |
|
|
77
|
+
|
|
78
|
+
> 上表 `run-tests` 的 `≈424 s / ≈121 s` 两列是 **65 项(44 套件 + 21 探针)** 时的实测(2026 年 math_computation
|
|
79
|
+
> P1/P2a + 审计修复轮之后)。`audit-formal-sensitivity`(49 探针,实测 wall 260.7 s)与 `e2e-v4-fixes`(≈ 98 s)
|
|
80
|
+
> 是两条最长的独立路径;两者都不在 `run-tests` 的默认集合里时,整轮 wall 由 `e2e-v4-fixes` 决定。
|
|
81
|
+
> 数字**形状**(`TOTAL 65 … suites 44 · probes 21`)以 runner 每次运行的输出为准。
|
|
70
82
|
|
|
71
83
|
单套件耗时(并行时的关键路径按此排序):
|
|
72
84
|
|
package/installer.js
CHANGED
|
@@ -54,24 +54,27 @@ export const PRESETS = [
|
|
|
54
54
|
{
|
|
55
55
|
src: 'vibe-math-v2',
|
|
56
56
|
dst: 'vibe-math-v2',
|
|
57
|
-
|
|
57
|
+
// math-computation.js + math-engines.js are PER-PRESET copies of the shared module (they must be
|
|
58
|
+
// listed here: on the <=0.1.6 line only these files are copied into .agent-presets/<id>/, and the
|
|
59
|
+
// preset JS imports them relatively). guard: tests/audit-math-computation-parity.mjs
|
|
60
|
+
files: ['agent.cordis.yml', 'preset.yml', 'vibe-math-v2.js', '实现方案.md', 'math-computation.js', 'math-engines.js'],
|
|
58
61
|
},
|
|
59
62
|
{
|
|
60
63
|
src: 'vibe-math-v3',
|
|
61
64
|
dst: 'vibe-math-v3',
|
|
62
|
-
files: ['agent.cordis.yml', 'preset.yml', 'vibe-math-v3.js', '实现方案.md'],
|
|
65
|
+
files: ['agent.cordis.yml', 'preset.yml', 'vibe-math-v3.js', '实现方案.md', 'math-computation.js', 'math-engines.js'],
|
|
63
66
|
},
|
|
64
67
|
{
|
|
65
68
|
src: 'vibe-math-v4',
|
|
66
69
|
dst: 'vibe-math-v4',
|
|
67
|
-
files: ['agent.cordis.yml', 'preset.yml', 'vibe-math-v4.js', '实现方案.md'],
|
|
70
|
+
files: ['agent.cordis.yml', 'preset.yml', 'vibe-math-v4.js', '实现方案.md', 'math-computation.js', 'math-engines.js'],
|
|
68
71
|
},
|
|
69
72
|
{
|
|
70
73
|
src: 'vibe-math-v5',
|
|
71
74
|
dst: 'vibe-math-v5',
|
|
72
75
|
// 架构图.md belongs here for the same reason 实现方案.md does: the installer's policy is to put
|
|
73
76
|
// the preset's documentation next to the preset, and the shipped v5 directory carries both.
|
|
74
|
-
files: ['agent.cordis.yml', 'preset.yml', 'vibe-math-v5.js', '实现方案.md', '架构图.md'],
|
|
77
|
+
files: ['agent.cordis.yml', 'preset.yml', 'vibe-math-v5.js', '实现方案.md', '架构图.md', 'math-computation.js', 'math-engines.js'],
|
|
75
78
|
},
|
|
76
79
|
]
|
|
77
80
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-vibe-math",
|
|
3
3
|
"description": "Multi-agent mathematical problem-solving & verification frameworks for DeepSeek Harness — FOUR agent presets in one install: vibe-math-v2 (probability-driven, classic: qs.json + Propos knowledge base + explorer→solver→review/debate verdict), vibe-math-v3 (THIRD-generation, classic: paper-style Markdown knowledge base with Problems/Progress/Propos/Methods/Verified + planner-agent scheduling that decides the next N actions + universal theory/method invention library + agents write their own Markdown directly via a per-file write lock), and vibe-math-v4 (FOURTH-generation: persistent self-organizing resident subagents that message & meet to decide all tasks, verify only by unanimous consensus, /compact at a context threshold, and stop only when all agree the problem is solved), and vibe-math-v5 (FIFTH-generation research institute: an academician as the organizational centre who decomposes and ASSIGNS work and chairs meetings; permanent researchers who hold the vote and may hire/fire their own temp workers; temp workers with no vote; a group chat and meetings; a durable per-recipient mailbox; a compare-and-set task DAG; and a boolean m-vote consensus rule where an object enters Verified/ only when at least m voting members agree AND every one of them returns exactly 1 or exactly 0). Installing this bundle auto-installs all four presets (v1 was removed at v2.0.0). Each preset also writes a FINAL PAPER by default when its run concludes — and does so BEFORE the run is marked complete: on v4/v5 the team co-authors its parts, merges them, cross-reviews, and the editor named by paperEditor finalises; the output is Paper/<run or institute id>/{paper.md,paper.tex,paper.pdf when a LaTeX engine is detected,paper.meta.json,paper.log.md} (params finalPaper/paperFormat/paperLanguage/paperCompilePdf/paperLatexCommand, plus paperEditor on v4/v5; see docs/final-paper.md).",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.7.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": "^22.19.0 || >=24.0.0",
|
|
@@ -35,6 +35,12 @@
|
|
|
35
35
|
"docs/架构图.md",
|
|
36
36
|
"docs/formal-verification.md",
|
|
37
37
|
"docs/final-paper.md",
|
|
38
|
+
"docs/math-computation.md",
|
|
39
|
+
"tests/audit-math-computation-parity.mjs",
|
|
40
|
+
"tests/audit-math-computation-contract.mjs",
|
|
41
|
+
"tests/audit-math-computation-sensitivity.mjs",
|
|
42
|
+
"tests/math-computation-shared.test.mjs",
|
|
43
|
+
"tests/helpers/math-computation-fake-seam.mjs",
|
|
38
44
|
"docs/generate_framework_diagram_v2.py",
|
|
39
45
|
"docs/generate_framework_diagram_v3.py",
|
|
40
46
|
"docs/generate_framework_diagram_v4.mjs",
|
|
@@ -68,19 +74,27 @@
|
|
|
68
74
|
"vibe-math-v2/preset.yml",
|
|
69
75
|
"vibe-math-v2/v2的额外要求.txt",
|
|
70
76
|
"vibe-math-v2/vibe-math-v2.js",
|
|
77
|
+
"vibe-math-v2/math-computation.js",
|
|
78
|
+
"vibe-math-v2/math-engines.js",
|
|
71
79
|
"vibe-math-v3/实现方案.md",
|
|
72
80
|
"vibe-math-v3/agent.cordis.yml",
|
|
73
81
|
"vibe-math-v3/preset.yml",
|
|
74
82
|
"vibe-math-v3/vibe-math-v3.js",
|
|
83
|
+
"vibe-math-v3/math-computation.js",
|
|
84
|
+
"vibe-math-v3/math-engines.js",
|
|
75
85
|
"vibe-math-v4/实现方案.md",
|
|
76
86
|
"vibe-math-v4/agent.cordis.yml",
|
|
77
87
|
"vibe-math-v4/preset.yml",
|
|
78
88
|
"vibe-math-v4/vibe-math-v4.js",
|
|
89
|
+
"vibe-math-v4/math-computation.js",
|
|
90
|
+
"vibe-math-v4/math-engines.js",
|
|
79
91
|
"vibe-math-v5/架构图.md",
|
|
80
92
|
"vibe-math-v5/实现方案.md",
|
|
81
93
|
"vibe-math-v5/agent.cordis.yml",
|
|
82
94
|
"vibe-math-v5/preset.yml",
|
|
83
95
|
"vibe-math-v5/vibe-math-v5.js",
|
|
96
|
+
"vibe-math-v5/math-computation.js",
|
|
97
|
+
"vibe-math-v5/math-engines.js",
|
|
84
98
|
"docs/release-notes/RELEASE-NOTES-2.0.22.md",
|
|
85
99
|
"docs/release-notes/RELEASE-NOTES-2.1.0.md",
|
|
86
100
|
"docs/release-notes/RELEASE-NOTES-2.2.0.md",
|
|
@@ -98,6 +112,8 @@
|
|
|
98
112
|
"docs/release-notes/RELEASE-NOTES-2.4.0.md",
|
|
99
113
|
"docs/release-notes/RELEASE-NOTES-2.4.1.md",
|
|
100
114
|
"docs/release-notes/RELEASE-NOTES-2.6.0.md",
|
|
115
|
+
"docs/release-notes/RELEASE-NOTES-2.7.0.md",
|
|
116
|
+
"docs/release-notes/RELEASE-NOTES-2.7.0.en.md",
|
|
101
117
|
"docs/release-notes/RELEASE-NOTES-2.5.0.md",
|
|
102
118
|
"docs/release-notes/RELEASE-NOTES-2.3.2.md",
|
|
103
119
|
"docs/release-notes/RELEASE-NOTES-2.3.3.md",
|
|
@@ -121,7 +137,9 @@
|
|
|
121
137
|
"scripts/build-preset-rows.mjs",
|
|
122
138
|
"preset-declaration.js",
|
|
123
139
|
"tests/audit-preset-rows.test.mjs",
|
|
124
|
-
"docs/COMPAT-AUDIT-ROUND3.md"
|
|
140
|
+
"docs/COMPAT-AUDIT-ROUND3.md",
|
|
141
|
+
"docs/release-notes/RELEASE-NOTES-2.7.1.md",
|
|
142
|
+
"docs/release-notes/RELEASE-NOTES-2.7.1.en.md"
|
|
125
143
|
],
|
|
126
144
|
"license": "MIT",
|
|
127
145
|
"keywords": [
|
|
@@ -151,7 +169,7 @@
|
|
|
151
169
|
},
|
|
152
170
|
"minVersion": "0.1.2-alpha.4",
|
|
153
171
|
"testedVersion": "0.2.0-rc.2",
|
|
154
|
-
"compatNote": "v2.
|
|
172
|
+
"compatNote": "v2.7.1 补丁版:① 诚实性与安装口径(替代方案改变精确性/结论强度必须声明;python 安装按检测到的环境分派 conda/mamba/uv/pip;R/Octave/Julia 的 system 作用域给出每引擎理由;版本求解交给包管理器,只按 base name 查存在,规格原样透传)+ ② 七个真机缺陷修复(probe 回显请求的引擎、发现 DSH 自带运行时、cli 包预检用 cli.command 的解释器、mode:code 真的传脚本且调用方 argv 优先、版本报真值、探针 argv 无 shell 元字符、探测 cwd 不再依赖项目目录已存在)+ 两条永久守卫(响应必须可 JSON 序列化;fresh-root 仿真)。既有参数默认值、数据格式与目录结构未变,DSH 支撑窗口不变,无需迁移。",
|
|
155
173
|
"compatibility": {
|
|
156
174
|
"dshReleases": {
|
|
157
175
|
"0.1.2-alpha.4": "compatible",
|