lingshu-solver 1.0.15 → 1.0.16

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/LICENSE CHANGED
@@ -1,101 +1,101 @@
1
- 灵数求解器 (LingShu Solver) 商业授权许可协议
2
- LingShu Solver Commercial License
3
-
4
- Copyright (c) 2026 红尘灵境数字科技有限公司 / 太白(邓其聪).
5
- 版权所有,保留一切权利。All rights reserved.
6
-
7
- --------------------------------------------------------------------------------
8
- 一、著作权与权利保留
9
- --------------------------------------------------------------------------------
10
- 本软件(包括但不限于源代码、目标代码、二进制文件、文档及随附资料,以下简称
11
- "本软件")的著作权及相关知识产权均归上述版权方(以下简称"版权方")所有。
12
- 除本协议明确授予的有限许可外,任何权利(包括但不限于复制、修改、分发、再许可、
13
- 出租、出借、商业使用、制作衍生作品之权利)均由版权方保留。
14
-
15
- --------------------------------------------------------------------------------
16
- 二、非商业性使用(免费)
17
- --------------------------------------------------------------------------------
18
- 在同时满足下列全部条件的"非商业性使用"范围内,版权方免费授予您一项非独占、
19
- 不可转让、可随时撤销的使用许可:
20
- 1. 个人学习、研究、教学或技术评测;
21
- 2. 非营利组织、开源社区或教育机构的内部非营利用途;
22
- 3. 年营业收入不超过人民币 100 万元的团队,将本软件仅用于内部评估,且同时
23
- 运行的实例数不超过 3 个。
24
- 上述许可的前提条件:
25
- (a) 您须在每一份副本或任何实质性部分中完整保留本版权声明与许可声明;
26
- (b) 未经版权方书面同意,不得移除、遮挡或篡改本软件中的任何版权、商标或
27
- 许可标识;
28
- (c) 为互操作性所必须的法定反向工程情形除外,您不得对本软件进行反向工程、
29
- 反编译或反汇编。
30
-
31
- --------------------------------------------------------------------------------
32
- 三、商业使用(须事先取得书面授权)
33
- --------------------------------------------------------------------------------
34
- 任何"商业使用"均须事先取得版权方签署的书面《商业授权协议》(Commercial
35
- License),未获书面授权一律禁止。商业使用包括但不限于:
36
- - 将本软件用于任何以营利为目的的产品、服务或业务;
37
- - 通过 SaaS、云部署、API 或任何其他方式,向第三方提供基于本软件的能力
38
- (无论是否收费);
39
- - 将本软件集成、嵌入或捆绑进任何商业发行物、设备或解决方案;
40
- - 对本软件进行再分发、转授权或对外提供托管;
41
- - 任何超出第二条"非商业性使用"范围的使用。
42
- 未经书面授权的任何商业使用均构成对版权的侵权,版权方保留依法追究全部法律
43
- 责任(包括但不限于停止侵权、损害赔偿及诉讼费用)的权利。
44
-
45
- --------------------------------------------------------------------------------
46
- 四、获取商业授权
47
- --------------------------------------------------------------------------------
48
- 商业授权申请与商务合作,请通过以下渠道联系版权方:
49
- 联系人:红尘灵境数字科技有限公司 / 太白(邓其聪)
50
- 邮箱:553420544@qq.com
51
- 仓库:https://github.com/genesis-plan/lingshu-solver(Issues 亦可用于商务咨询)
52
- 授权范围、地域、期限与费用以双方签署的书面协议为准。
53
-
54
- --------------------------------------------------------------------------------
55
- 五、商标与品牌
56
- --------------------------------------------------------------------------------
57
- "灵数 / 灵数求解器 / LingShu Solver" 及相关名称、标识为版权方的商标或商号。
58
- 本协议不授予任何商标使用权。未经书面许可,您不得使用上述名称、标识进行任何
59
- 宣传或背书。
60
-
61
- --------------------------------------------------------------------------------
62
- 六、无担保与责任限制
63
- --------------------------------------------------------------------------------
64
- 本软件按"现状"提供,不提供任何明示或默示担保(包括但不限于对适销性、
65
- 特定用途适用性及不侵权的担保)。在任何情况下,无论基于合同、侵权或其他法
66
- 理,版权方均不对因使用或无法使用本软件所产生的任何直接、间接、附带、特殊
67
- 或后果性损害承担责任。
68
-
69
- --------------------------------------------------------------------------------
70
- 七、终止
71
- --------------------------------------------------------------------------------
72
- 若您违反本协议任何条款,本许可自动终止。终止后您须立即停止使用本软件,并
73
- 销毁所持有的全部副本(包括任何备份与衍生作品)。
74
-
75
- --------------------------------------------------------------------------------
76
- 八、适用法律
77
- --------------------------------------------------------------------------------
78
- 本协议受中华人民共和国法律管辖,并按其解释。因本协议产生的争议,提交版权
79
- 方所在地有管辖权的人民法院诉讼解决。
80
-
81
- --------------------------------------------------------------------------------
82
- 九、版本适用范围(重要)
83
- --------------------------------------------------------------------------------
84
- 自 lingshu-solver@1.0.4 起的版本适用本协议。更早版本(含 1.0.3 及此前)曾
85
- 以 Apache License 2.0 发布,该等已发布版本继续按其发布时随附的 Apache
86
- License 2.0 条款提供,此为历史事实且不可撤回;但其不延伸适用于本协议生效
87
- 后的任何新版本。
88
-
89
- --------------------------------------------------------------------------------
90
- 英文摘要 / English Summary
91
- --------------------------------------------------------------------------------
92
- Copyright (c) 2026 红尘灵境数字科技有限公司 / 太白(邓其聪). All rights reserved.
93
- This software is NOT open source and NOT free for commercial use. Non-commercial
94
- use (personal study, research, non-profit / educational internal use, or limited
95
- internal evaluation within a small low-revenue team) is permitted free of charge
96
- subject to retaining this notice. ANY commercial use requires a prior written
97
- Commercial License from the copyright holder. Unauthorized commercial use is
98
- prohibited and constitutes copyright infringement. This license applies to
99
- lingshu-solver@1.0.4 and later; earlier versions remain under the Apache License
100
- 2.0 as originally distributed. Provided "AS IS" without warranty; liability is
101
- excluded to the maximum extent permitted by law.
1
+ 灵数求解器 (LingShu Solver) 商业授权许可协议
2
+ LingShu Solver Commercial License
3
+
4
+ Copyright (c) 2026 红尘灵境数字科技有限公司 / 太白(邓其聪).
5
+ 版权所有,保留一切权利。All rights reserved.
6
+
7
+ --------------------------------------------------------------------------------
8
+ 一、著作权与权利保留
9
+ --------------------------------------------------------------------------------
10
+ 本软件(包括但不限于源代码、目标代码、二进制文件、文档及随附资料,以下简称
11
+ "本软件")的著作权及相关知识产权均归上述版权方(以下简称"版权方")所有。
12
+ 除本协议明确授予的有限许可外,任何权利(包括但不限于复制、修改、分发、再许可、
13
+ 出租、出借、商业使用、制作衍生作品之权利)均由版权方保留。
14
+
15
+ --------------------------------------------------------------------------------
16
+ 二、非商业性使用(免费)
17
+ --------------------------------------------------------------------------------
18
+ 在同时满足下列全部条件的"非商业性使用"范围内,版权方免费授予您一项非独占、
19
+ 不可转让、可随时撤销的使用许可:
20
+ 1. 个人学习、研究、教学或技术评测;
21
+ 2. 非营利组织、开源社区或教育机构的内部非营利用途;
22
+ 3. 年营业收入不超过人民币 100 万元的团队,将本软件仅用于内部评估,且同时
23
+ 运行的实例数不超过 3 个。
24
+ 上述许可的前提条件:
25
+ (a) 您须在每一份副本或任何实质性部分中完整保留本版权声明与许可声明;
26
+ (b) 未经版权方书面同意,不得移除、遮挡或篡改本软件中的任何版权、商标或
27
+ 许可标识;
28
+ (c) 为互操作性所必须的法定反向工程情形除外,您不得对本软件进行反向工程、
29
+ 反编译或反汇编。
30
+
31
+ --------------------------------------------------------------------------------
32
+ 三、商业使用(须事先取得书面授权)
33
+ --------------------------------------------------------------------------------
34
+ 任何"商业使用"均须事先取得版权方签署的书面《商业授权协议》(Commercial
35
+ License),未获书面授权一律禁止。商业使用包括但不限于:
36
+ - 将本软件用于任何以营利为目的的产品、服务或业务;
37
+ - 通过 SaaS、云部署、API 或任何其他方式,向第三方提供基于本软件的能力
38
+ (无论是否收费);
39
+ - 将本软件集成、嵌入或捆绑进任何商业发行物、设备或解决方案;
40
+ - 对本软件进行再分发、转授权或对外提供托管;
41
+ - 任何超出第二条"非商业性使用"范围的使用。
42
+ 未经书面授权的任何商业使用均构成对版权的侵权,版权方保留依法追究全部法律
43
+ 责任(包括但不限于停止侵权、损害赔偿及诉讼费用)的权利。
44
+
45
+ --------------------------------------------------------------------------------
46
+ 四、获取商业授权
47
+ --------------------------------------------------------------------------------
48
+ 商业授权申请与商务合作,请通过以下渠道联系版权方:
49
+ 联系人:红尘灵境数字科技有限公司 / 太白(邓其聪)
50
+ 邮箱:553420544@qq.com
51
+ 仓库:https://github.com/genesis-plan/lingshu-solver(Issues 亦可用于商务咨询)
52
+ 授权范围、地域、期限与费用以双方签署的书面协议为准。
53
+
54
+ --------------------------------------------------------------------------------
55
+ 五、商标与品牌
56
+ --------------------------------------------------------------------------------
57
+ "灵数 / 灵数求解器 / LingShu Solver" 及相关名称、标识为版权方的商标或商号。
58
+ 本协议不授予任何商标使用权。未经书面许可,您不得使用上述名称、标识进行任何
59
+ 宣传或背书。
60
+
61
+ --------------------------------------------------------------------------------
62
+ 六、无担保与责任限制
63
+ --------------------------------------------------------------------------------
64
+ 本软件按"现状"提供,不提供任何明示或默示担保(包括但不限于对适销性、
65
+ 特定用途适用性及不侵权的担保)。在任何情况下,无论基于合同、侵权或其他法
66
+ 理,版权方均不对因使用或无法使用本软件所产生的任何直接、间接、附带、特殊
67
+ 或后果性损害承担责任。
68
+
69
+ --------------------------------------------------------------------------------
70
+ 七、终止
71
+ --------------------------------------------------------------------------------
72
+ 若您违反本协议任何条款,本许可自动终止。终止后您须立即停止使用本软件,并
73
+ 销毁所持有的全部副本(包括任何备份与衍生作品)。
74
+
75
+ --------------------------------------------------------------------------------
76
+ 八、适用法律
77
+ --------------------------------------------------------------------------------
78
+ 本协议受中华人民共和国法律管辖,并按其解释。因本协议产生的争议,提交版权
79
+ 方所在地有管辖权的人民法院诉讼解决。
80
+
81
+ --------------------------------------------------------------------------------
82
+ 九、版本适用范围(重要)
83
+ --------------------------------------------------------------------------------
84
+ 自 lingshu-solver@1.0.4 起的版本适用本协议。更早版本(含 1.0.3 及此前)曾
85
+ 以 Apache License 2.0 发布,该等已发布版本继续按其发布时随附的 Apache
86
+ License 2.0 条款提供,此为历史事实且不可撤回;但其不延伸适用于本协议生效
87
+ 后的任何新版本。
88
+
89
+ --------------------------------------------------------------------------------
90
+ 英文摘要 / English Summary
91
+ --------------------------------------------------------------------------------
92
+ Copyright (c) 2026 红尘灵境数字科技有限公司 / 太白(邓其聪). All rights reserved.
93
+ This software is NOT open source and NOT free for commercial use. Non-commercial
94
+ use (personal study, research, non-profit / educational internal use, or limited
95
+ internal evaluation within a small low-revenue team) is permitted free of charge
96
+ subject to retaining this notice. ANY commercial use requires a prior written
97
+ Commercial License from the copyright holder. Unauthorized commercial use is
98
+ prohibited and constitutes copyright infringement. This license applies to
99
+ lingshu-solver@1.0.4 and later; earlier versions remain under the Apache License
100
+ 2.0 as originally distributed. Provided "AS IS" without warranty; liability is
101
+ excluded to the maximum extent permitted by law.
package/README.md CHANGED
@@ -1,111 +1,136 @@
1
- # 灵数求解器 · Lingshu Solver
1
+ # Lingshu Solver
2
2
 
3
- **品类(Category)**:认证实根计算 · Certified Real-Root Computation
3
+ **Category:** Certified Real-Root Computation
4
4
 
5
- [![License](https://img.shields.io/badge/license-非商业免费%20%2F%20商业须书面授权-blue)](LICENSE)
5
+ [![License](https://img.shields.io/badge/license-free%20for%20non--commercial%20%2F%20commercial%20needs%20written%20permission-blue)](LICENSE)
6
6
  [![MCP](https://img.shields.io/badge/MCP-Streamable%20HTTP%20%2B%20stdio-blue)](https://modelcontextprotocol.io)
7
- [![Deterministic](https://img.shields.io/badge/core-deterministic%20%2F%20non--LLM-green)](docs/03-设计思想.md)
7
+ [![Deterministic](https://img.shields.io/badge/core-deterministic%20%2F%20non--LLM-green)](docs/03-%E8%AE%BE%E8%AE%A1%E6%80%9D%E6%83%B3.md)
8
8
  [![npm](https://img.shields.io/npm/v/lingshu-solver)](https://www.npmjs.com/package/lingshu-solver)
9
9
 
10
- > **确定性**实数方程组求解器 —— 同样的题永远得到同样的答案,不含大模型、无随机、无幻觉。
11
- > 每个找到的解都经 **Krawczyk 区间认证**(`certified: true`),可复现、可回代验证、可进审计链。
10
+ > A **deterministic** solver for systems of real equations. The same problem always produces the same
11
+ > answer — no language model, no randomness, no hallucination. Every solution it reports is
12
+ > **Krawczyk-certified** (`certified: true`), reproducible, checkable by substitution, and usable as an
13
+ > audit trail.
12
14
 
13
- **它给两种对象用**:普通用户(网页打开即用)与 AI Agent(标准 MCP 工具,一行接入)。
15
+ **Two audiences:** people who just want an answer (open the web page, no install), and AI agents (a
16
+ standard MCP tool, one line to connect).
14
17
 
15
- | | 说明 |
18
+ 🔬 **Live demo against the production endpoint:**
19
+ <https://hclj-1409755229.cos.ap-guangzhou.myqcloud.com/lingshu-solver/demo.html> — call the real MCP
20
+ endpoint right from the browser and watch `poly_roots` return certified real roots and `verify` judge a
21
+ candidate value. Thirty seconds is enough to see why "an LLM will mis-compute this, Lingshu can certify it".
22
+
23
+ | | |
16
24
  |---|---|
17
- | **是** | 确定性(非大模型)的实数方程组**数值**求解引擎;代数方程与常见超越函数(`sin/cos/tan/log/exp/sqrt/abs`)均可 |
18
- | **不是** | 符号 CAS(不输出解析推导)、微分方程求解器、整数规划求解器,也不是"保证不漏解"的完备判定器 |
25
+ | **Yes** | a deterministic (non-LLM) **numerical** engine for systems of real equations; algebraic equations and common transcendentals (`sin/cos/tan/log/exp/sqrt/abs`) all work |
26
+ | **No** | a symbolic CAS (no analytic derivation), an ODE solver, an integer-programming solver, and it does **not** claim guaranteed completeness |
19
27
 
20
28
  ---
21
29
 
22
- ## 30 秒上手
30
+ ## 30 seconds to start
23
31
 
24
- **① 网页版(零安装,永久免费)**
32
+ **① Web (zero install, permanently free)**
25
33
 
26
- - 主站:<https://hongchenlingjing.com/>
27
- - 备用镜像:<https://genesis-plan.github.io/lingshu-solver/> | <https://hclj-1409755229.cos.ap-guangzhou.myqcloud.com/lingshu-solver/index.html>
34
+ - Main site: <https://hongchenlingjing.com/>
35
+ - Mirrors: <https://genesis-plan.github.io/lingshu-solver/> ·
36
+ <https://hclj-1409755229.cos.ap-guangzhou.myqcloud.com/lingshu-solver/index.html>
28
37
 
29
- 在输入框写方程(如 `x^2 + y^2 = 25` 与 `x + y = 7`),点求解。计算全部在浏览器内完成,方程不出设备。
38
+ Type equations into the box (for example `x^2 + y^2 = 25` and `x + y = 7`) and press solve. Everything is
39
+ computed inside your browser; the equations never leave your device.
30
40
 
31
- **② AI Agent 接入(MCP,两种形态任选)**
41
+ **② AI agent (MCP — pick either form)**
32
42
 
33
43
  ```json
34
- // 本地 stdio —— 永久免费、不限次数、离线,推荐
44
+ // local stdio — permanently free, unlimited, offline. Recommended.
35
45
  { "mcpServers": { "lingshu-solver": { "command": "npx", "args": ["-y", "lingshu-solver"] } } }
36
46
  ```
37
47
 
38
48
  ```json
39
- // 远程托管端点 —— 免安装、常驻、公网直连(固定 ¥0.01/次;传 honorPaid 即免费放行)
49
+ // hosted endpoint — no install, always on, reachable over the public internet
40
50
  { "mcpServers": { "lingshu-solver": { "type": "http", "url": "https://hongchenlingjing.com/mcp" } } }
41
51
  ```
42
52
 
43
- > **不想付费也照常用**:远程端点走**信任制** —— `solve` 入参加 `"honorPaid": true` 即免费放行(不验证、不扣余额);
44
- > 本地 `npx` 版与网页版永久免费。愿意支持请看[付款页](https://hongchenlingjing.com/pay/)(对公账户,付款后自助入账、立即生效,无需任何人审核)。
53
+ > **It also works if you never pay:** the hosted endpoint runs on an honor system — pass
54
+ > `"honorPaid": true` in the `solve` arguments and the call is released for free (no verification, no
55
+ > balance deduction). The `npx` local version and the web version are permanently free. If you do want to
56
+ > support it, see the [payment page](https://hongchenlingjing.com/pay/) — a corporate account, self-service
57
+ > crediting, effective immediately, no human approval anywhere in the loop.
45
58
 
46
- **③ 开发者**
59
+ **③ Developer**
47
60
 
48
61
  ```bash
49
62
  git clone https://github.com/genesis-plan/lingshu-solver.git
50
63
  cd lingshu-solver
51
- node mcp-server.js # 启动本地 MCP(stdio)服务端
52
- node test/regression.js # 常驻考卷回归
64
+ node mcp-server.js # start the local MCP (stdio) server
65
+ node test/regression.js # standing regression suite
53
66
  ```
54
67
 
55
68
  ---
56
69
 
57
- ## 能力边界(诚实声明)
70
+ ## Honest boundaries
58
71
 
59
- | 维度 | 说明 |
72
+ | Dimension | What it means |
60
73
  |---|---|
61
- | 已验证解 | 每个找到的解经 Krawczyk 认证(`tier=proven`),误差 ≤ 认证半径,数学保真 |
62
- | 穷尽性 | **尽力穷尽多解**;预算内未证明穷尽时显式标 `truncated=true`,**绝不谎称已完备** |
63
- | `truncated` 语义 | 仅表示「全局分支未在预算内完全判定」,**不等于一定漏解**;多数情况下全部真解已找到 |
64
- | 变量数 | ≤ 6 |
65
- | 方程数 | 1–64 条(服务端护栏),且须 ≥ 变量数 |
66
- | 数值范围 | 默认搜索域 ±1e6;对快增长函数(`exp/sinh`)建议显式给定 `domain` |
67
- | 输出精度 | 固定 6 位小数(不提供位数切换) |
68
- | 确定性 | 无随机分支,同输入永远同输出,可安全缓存 |
69
- | 数据 | 网页端零上行;本地版离线;托管端点不落盘方程内容 |
70
- | 依赖 | 零第三方依赖(只用 Node 内置模块与浏览器标准 API) |
71
-
72
- **不保证**:对一切输入 100% 穷尽;对高度病态系统在预算内必收敛。
73
- 这是数值数学的诚实下界('保证找到全部解'在一般情形下不可判定),不是待修缺陷。
74
+ | Verified solutions | every reported solution is Krawczyk-certified (`tier=proven`); error is within the certified radius; mathematically faithful |
75
+ | Completeness | **best effort** at finding all solutions; when exhaustiveness could not be proven within budget it says so explicitly with `truncated=true` — it never claims completeness it did not prove |
76
+ | `truncated` semantics | only means "the global branch search did not finish inside the budget"; it does **not** mean solutions were missed. In most cases every real solution was found |
77
+ | Variables | ≤ 6 |
78
+ | Equations | 1–64 (server-side guard), and the count must be ≥ the variable count |
79
+ | Search range | default ±1e6 per variable; supply `domain` explicitly for fast-growing functions (`exp/sinh`) |
80
+ | Output precision | fixed at 6 decimal places (there is no precision switch) |
81
+ | Determinism | no random branching; identical input always yields identical output, so caching is safe |
82
+ | Data | web version sends nothing upward; local version runs offline; the hosted endpoint does not persist equation contents |
83
+ | Dependencies | zero third-party dependencies (Node built-ins and standard browser APIs only) |
84
+
85
+ **Not guaranteed:** 100% exhaustiveness for every input, or convergence inside budget for highly
86
+ pathological systems. That is the honest floor of numerical mathematics ("guaranteeing all solutions"
87
+ is undecidable in the general case), not a defect to be fixed.
74
88
 
75
89
  ---
76
90
 
77
- ## 文档
91
+ ## Documentation
92
+
93
+ The design docs are written in Chinese; the machine-readable description for AI agents lives at
94
+ [llms.txt](llms.txt).
78
95
 
79
- | 文档 | 内容 |
96
+ | Doc | Contents |
80
97
  |---|---|
81
- | [01 · 产品作用](docs/01-产品作用.md) | 它是什么、解决什么问题、给谁用、能力与边界、对外口径 |
82
- | [02 · 使用指南](docs/02-使用指南.md) | 三种形态上手、MCP 工具契约(入参/出参/错误)、自托管部署、常见问题 |
83
- | [03 · 设计思想](docs/03-设计思想.md) | 六条设计原则、为什么可信、为什么不用大模型、有意不做的事 |
84
- | [04 · 技术参考](docs/04-技术参考.md) | 数学框架、算法流水线、49 个算子全表、规格硬约束、测试体系 |
85
- | [05 · 应用场景](docs/05-应用场景.md) | 七类可落地场景(Agent 后端 / 多 Agent / 链下计算 / 财税风控 / 私有化 / 教育 / 审计)与不适用场景 |
86
- | [06 · 商业授权与收费](docs/06-商业授权与收费.md) | 许可模型、免费范围、托管端点计费、企业年授权、发票与收款 |
87
- | [07 · 授权合同](docs/07-授权合同.md) | 商业授权合同模板、关键条款说明、签署流程 |
88
- | [08 · 版本管理](docs/08-版本管理.md) | 版本号语义、发布流程与一致性清单、兼容性承诺、版本历史 |
89
- | [09 · 项目历史](docs/09-项目历史.md) | 从起因到当前的阶段沿革与定位 |
90
-
91
- > 隐私与安全承诺另见:[privacy.html](privacy.html)(对外页面)。
98
+ | [01 · Product role](docs/01-%E4%BA%A7%E5%93%81%E4%BD%9C%E7%94%A8.md) | what it is, what problem it solves, who it is for, capabilities and limits, official wording |
99
+ | [02 · User guide](docs/02-%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97.md) | the three forms, the MCP tool contract (input/output/errors), self-hosting, FAQ |
100
+ | [03 · Design ideas](docs/03-%E8%AE%BE%E8%AE%A1%E6%80%9D%E6%83%B3.md) | six design principles, why it is trustworthy, why no LLM, what it deliberately refuses to do |
101
+ | [04 · Technical reference](docs/04-%E6%8A%80%E6%9C%AF%E5%8F%82%E8%80%83.md) | mathematical framework, algorithm pipeline, operator table, hard spec constraints, test suite |
102
+ | [05 · Use cases](docs/05-%E5%BA%94%E7%94%A8%E5%9C%BA%E6%99%AF.md) | seven applicable scenarios (agent backend / multi-agent / off-chain computation / tax and finance control / on-prem / education / audit) and the ones that do not apply |
103
+ | [06 · Commercial licence and pricing](docs/06-%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%E4%B8%8E%E6%94%B6%E8%B4%B9.md) | licence model, what is free, hosted-endpoint metering, enterprise annual licence, invoicing |
104
+ | [07 · Licence contract](docs/07-%E6%8E%88%E6%9D%83%E5%90%88%E5%90%8C.md) | commercial licence template, clause walkthrough, signing flow |
105
+ | [08 · Versioning](docs/08-%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86.md) | version semantics, release flow and the consistency checklist, compatibility promises, history |
106
+ | [09 · Project history](docs/09-%E9%A1%B9%E7%9B%AE%E5%8E%86%E5%8F%B2.md) | how it got from the original problem to where it stands now |
107
+
108
+ > Privacy and security commitments are published separately: [privacy.html](privacy.html).
92
109
 
93
110
  ---
94
111
 
95
- ## 许可(摘要)
112
+ ## Licence (summary)
96
113
 
97
- **非商业免费 + 商业须书面授权**(自有《灵数求解器商业授权许可协议》,非开源协议):
114
+ **Free for non-commercial use; commercial use requires written permission** (a proprietary licence of our
115
+ own, not an open-source licence):
98
116
 
99
- - **非商业用途免费**:个人学习/研究/教学/评测;非营利组织与教育机构内部使用;年营收 ≤ 100 万元的团队内部评估(≤ 3 实例)。
100
- - **商业用途须事先取得书面授权**:任何以营利为目的的产品/服务/业务、SaaS/云/API 转售、集成嵌入、再分发托管,均须取得《商业授权协议》。
101
- - **版本适用**:`1.0.4` 起适用本协议;`1.0.3` 及更早版本按其发布时的 Apache License 2.0 提供(历史事实,不可撤回,但不延伸至新版本)。
117
+ - **Non-commercial, free:** personal study / research / teaching / evaluation; internal use by non-profit
118
+ organisations and educational institutions; internal evaluation by teams with annual revenue up to RMB 1
119
+ million (≤ 3 instances).
120
+ - **Commercial use needs prior written permission:** any product, service or business operated for profit,
121
+ resale of SaaS/cloud/API, integration, embedding, or redistribution as a hosted service.
122
+ - **Version applicability:** this licence applies from `1.0.4`. Versions `1.0.3` and earlier remain under
123
+ the Apache License 2.0 as published at the time (a historical fact, not revocable, and it does not extend
124
+ to later versions).
102
125
 
103
- 完整条款见 [LICENSE](LICENSE) | 授权范围与报价见 [06 · 商业授权与收费](docs/06-商业授权与收费.md) | 合同见 [07 · 授权合同](docs/07-授权合同.md)
126
+ Full terms in [LICENSE](LICENSE) · scope and pricing in
127
+ [06 · Commercial licence and pricing](docs/06-%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%E4%B8%8E%E6%94%B6%E8%B4%B9.md)
128
+ · contract in [07 · Licence contract](docs/07-%E6%8E%88%E6%9D%83%E5%90%88%E5%90%8C.md)
104
129
 
105
130
  ---
106
131
 
107
- ## 联系
132
+ ## Contact
108
133
 
109
- - 商务 / 授权 / 反馈:553420544@qq.com(亦可用仓库 Issues)
110
- - 版权方:广州市红尘灵境数字科技有限公司
111
- - 备案:粤ICP备2026031206号-3 | 粤公网安备44011402001444号
134
+ - Business / licence / feedback: 553420544@qq.com (or open an issue in this repository)
135
+ - Copyright holder: Guangzhou Hongchen Lingjing Digital Technology Co., Ltd. (广州市红尘灵境数字科技有限公司)
136
+ - Filing: 粤ICP备2026031206号-3 · 粤公网安备44011402001444号
@@ -47,7 +47,7 @@ const solverCore = require('./solver-core');
47
47
  const { solve } = solverCore;
48
48
 
49
49
  const SERVER_NAME = 'lingshu-solver';
50
- const SERVER_VERSION = '1.0.15';
50
+ const SERVER_VERSION = '1.0.16';
51
51
  const PORT = parseInt(process.env.PORT || '3000', 10);
52
52
 
53
53
  // ---- 护栏常量(防畸形/恶意输入耗尽资源,与 stdio 版一致)----
@@ -937,92 +937,77 @@ function doVerify(args) {
937
937
  const TOOLS = [
938
938
  {
939
939
  name: 'solve',
940
- description: '求解实数方程组的确定性数值引擎(非大模型,无随机、同输入输出可复现)。适用:需可验证、可复现的实数解(代数或 sin/cos/tan/log/exp/sqrt/abs 等常见超越函数),尤其给 AI Agent 当"不会胡说"的数学后端。' +
941
- '不适用:纯符号推导/闭式证明、微分方程初值问题、整数/必不等于等强制约束(暂不支持)。' +
942
- '输入:equations 为含 "=" 的方程字符串数组,如 ["x^2+y^2=25","x+y=7"];variables 可选(不填自动识别,最多6个);domain 可选(如 {"x":[-30,30]}),否则默认每变量 ±1e6。' +
943
- '硬限制:变量 ≤6;方程 1–64 条且数量须 ≥ 变量数;单次方程文本 ≤100KB;输出固定 6 位小数(不可切换)。' +
944
- '输出(JSON):resultType=empty(严格证无实数解)/finite(有限已验证解)/infinite(无限解集,仅给距原点最近推荐解);summary=中文一句话总览;solutions[] 每解含 values[](6位小数数值)、tier(proven=Krawczyk已认证/likely/candidate)、certified、text(人类可读如"x=4.000000, y=3.000000"),残差等内部数值收在 internals 子块(机器可跳过);certified=是否全proven;recommended=距原点最近解的精简结构。' +
945
- 'truncated=true:预算内未完成全局分支判定、未证明已穷尽——不等于一定漏解,多数情况全部真解已找到;极端病态下可能遗漏个别解,可缩 domain 或提高 budget 重试。' +
946
- '错误返回 error.type(invalid_input=输入不合法/超限,internal_error=内部异常)。遇卡点或认为结果有误,请调用 give_feedback(内容仅落本地日志,不外传)。相同输入永远返回完全相同结果,可安全缓存与重复调用。' +
947
- '★ 计费边界(Agent 必读):本端点按信任制运转 —— 不付钱也能用。solve 入参传 honorPaid:true(声明「个人/评估用途」)即免费放行、不验证、不扣余额;若结果用于产品或商业/自动化流程,欢迎走付费通道支持作者(GET /pricing 取得订单与 key)——付费属自愿,非强制。',
940
+ description: 'Deterministic solver for systems of real equations. This is not a language model: no randomness, and identical input always returns an identical, reproducible result. Use it when you need a verifiable, reproducible numeric answer for algebraic equations or common transcendentals (sin/cos/tan/log/exp/sqrt/abs); it works well as a non-hallucinating math backend for an AI agent. Not suitable for symbolic algebra, closed-form proofs, initial-value ODEs, or mandatory integer equality. INPUT: equations (array of strings containing an equals sign, e.g. ["x^2+y^2=25","x+y=7"]); supported operators + - * / ^ sqrt log sin cos tan exp abs, with in-text domain constraints such as x in [-30,30]; variables (optional, auto-detected, max 6); domain (optional, e.g. {"x":[-30,30]}), defaulting to +/-1e6 per variable. HARD LIMITS: at most 6 variables; 1 to 64 equations and the equation count must be at least the variable count; up to 100KB of equation text per call; output is fixed at 6 decimal places and is not configurable. OUTPUT (JSON): resultType is empty (no real solutions, proven), finite (finite verified solutions) or infinite (infinite solution set, only the recommended nearest-to-origin solution is given); summary; solutions[] with values[] (6-decimal numbers), tier (proven means Krawczyk-certified, otherwise likely or candidate), certified, text; residual and other internals under internals; recommended holds the compact nearest-to-origin structure. truncated=true means the global branch-and-bound did not finish inside the budget; it does not necessarily mean solutions were missed and in most cases every real solution was found; narrow the domain or raise options.budget and retry if you need a completeness guarantee. Errors return error.type (invalid_input or internal_error). If something looks wrong, call give_feedback rather than guessing. The same input always produces the exact same output, so caching and retries are safe. PAYMENT: this endpoint is free to use. Pass honorPaid:true to declare personal or evaluation use and the call is served with no verification and no balance deduction; payment is voluntary and never enforced.',
948
941
  inputSchema: {
949
942
  type: 'object',
950
943
  properties: {
951
944
  equations: {
952
945
  type: 'array', items: { type: 'string' },
953
- description: '方程字符串数组,如 ["x^2 + y^2 = 25", "x + y = 7"]。支持 + - * / ^ sqrt log sin cos tan exp abs,以及 in-text 域约束 "x ∈ [-30,30]"。'
946
+ description: 'Array of equation strings, e.g. ["x^2 + y^2 = 25", "x + y = 7"]. Supports + - * / ^ sqrt log sin cos tan exp abs, plus in-text domain constraints such as x in [-30,30].'
954
947
  },
955
948
  variables: {
956
949
  type: 'array', items: { type: 'string' },
957
- description: '变量名数组(可选)。不填则由方程文本自动识别,顺序按出现。最多 6 个。'
950
+ description: 'Variable names (optional). If omitted they are auto-detected from the equation text, in order of appearance. Maximum 6.'
958
951
  },
959
952
  domain: {
960
953
  type: 'object',
961
- description: '显式搜索域(可选)。形如 {"x":[-30,30],"y":[-30,30]}。对"有限解·部分"演示或快增长函数(exp/sinh)建议显式给定,否则默认 ±1e6 可能剪枝失效并触发 truncated。'
954
+ description: 'Explicit search domain (optional), e.g. {"x":[-30,30],"y":[-30,30]}. Recommended for near-infinite solution sets or fast-growing functions such as exp or sinh; without it the default +/-1e6 may fail to prune and set truncated.'
962
955
  },
963
- fastMode: { type: 'boolean', description: '快速模式(默认 false)' },
964
- honorPaid: { type: 'boolean', description: '信任制:声明本次为「个人/评估用途」即放行(不验证、不扣余额)——不付钱也能用。若结果用于产品/商业/自动化流程,欢迎改走付费通道(GET /pricing 取得订单与 key)支持作者;付费属自愿,本服务不做强制验证。' },
965
- options: { type: 'object', description: '高级选项(可选),如 {budget:500000, maxDepth:28}' }
956
+ fastMode: { type: 'boolean', description: 'Fast mode (default false).' },
957
+ honorPaid: { type: 'boolean', description: 'Honor system: set true to declare this call personal or evaluation use. It is released for free with no verification and no balance deduction. Set false only when this runs inside a product, a commercial pipeline or an automated workflow; payment is voluntary and never enforced.' },
958
+ options: { type: 'object', description: 'Advanced options (optional), e.g. {budget:500000, maxDepth:28}' }
966
959
  },
967
960
  required: ['equations']
968
961
  }
969
962
  },
970
963
  {
971
964
  name: 'give_feedback',
972
- description: 'AI 智能体在调用 solve 遇到卡点、错误、或认为结果有问题时,主动回报。' +
973
- '回报内容仅落本地 feedback.log,不会外传。帮助作者持续改进。',
965
+ description: 'Report a problem to the operator when solve hits a dead end, returns an error, or produces something you believe is wrong. The text is written to a local log only and is never transmitted anywhere else.',
974
966
  inputSchema: {
975
967
  type: 'object',
976
968
  properties: {
977
- message: { type: 'string', description: '反馈内容:遇到了什么、期望什么、实际得到什么。' },
978
- context: { type: 'string', description: '可选上下文:触发场景、输入特征等。' }
969
+ message: { type: 'string', description: 'What you hit, what you expected, and what you actually got.' },
970
+ context: { type: 'string', description: 'Optional context: the triggering scenario or input characteristics.' }
979
971
  },
980
972
  required: ['message']
981
973
  }
982
974
  },
983
975
  {
984
976
  name: 'poly_roots',
985
- description: '多项式全部实根,逐个 Krawczyk 认证(带严格误差盒)。输入系数「最高次在前」,如 [1,-2,-5,6] 表示 x³−2x²−5x+6。确定性、可复现、可证明正确;复数根不返回(本品只做实数)。给 AI Agent 当「可靠的多项式求根件」——不会再像通用 LLM 那样把根算错或半对。' +
986
- '★ 计费边界(Agent 必读):与 solve 同规则 —— honorPaid:true 即信任制免费放行;否则走付费通道(GET /pricing)。',
977
+ description: 'All real roots of a polynomial, each individually certified by Krawczyk with a strict error box. Coefficients are ordered highest degree first, so [1,-2,-5,6] means x^3-2x^2-5x+6. Deterministic and reproducible; complex roots are not returned (real numbers only). Use it as a reliable polynomial root component instead of letting a general language model estimate roots. Free to use: pass honorPaid:true to declare personal or evaluation use.',
987
978
  inputSchema: {
988
979
  type: 'object',
989
980
  properties: {
990
- coefficients: { type: 'array', items: { type: 'number' }, description: '多项式系数,最高次在前。如 [1,-2,-5,6] 对应 x³−2x²−5x+6。' },
991
- tolerance: { type: 'number', description: '根的判定容差(可选,默认内部精度)' }
981
+ coefficients: { type: 'array', items: { type: 'number' }, description: 'Polynomial coefficients, highest degree first. [1,-2,-5,6] means x^3-2x^2-5x+6.' },
982
+ tolerance: { type: 'number', description: 'Tolerance used to decide a root (optional; internal precision is used by default).' }
992
983
  },
993
984
  required: ['coefficients']
994
985
  }
995
986
  },
996
987
  {
997
988
  name: 'verify',
998
- description: '核验一个「声称的答案」到底对不对——这是「LLM 猜了 2.1、真根是精确 2」的检查。输入方程 + 候选值/点(数字,或 {变量:值},或按 variables 顺序的数组),本工具在候选点邻域内调用同一套认证内核:若找到与之匹配的认证根 → 返回 verified + 误差盒;若找不到 → 返回 refuted 并附上最近的认证根(让 Agent 立刻看到正确值)。确定性、非 LLM、结果可复现。' +
999
- '★ 计费边界(Agent 必读):与 solve 同规则 —— honorPaid:true 即信任制免费放行;否则走付费通道(GET /pricing)。',
989
+ description: 'Check whether a claimed answer is correct. Give the equation plus a candidate value (a number for a single variable, {variable:value} pairs, or an array in variable order); the same certified kernel runs in a neighbourhood around the candidate. If a matching certified root is found the result is verified together with the error box; otherwise it is refuted and the nearest certified root is returned, so the calling agent immediately sees the correct value. Deterministic, not an LLM, reproducible across calls. Free to use: pass honorPaid:true to declare personal or evaluation use.',
1000
990
  inputSchema: {
1001
991
  type: 'object',
1002
992
  properties: {
1003
- equation: { type: 'string', description: '含 "=" 的方程,如 "x^2 = 4"。' },
1004
- candidate: { description: '声称的答案:数字(单变量,默认变量 x)、{变量:值}(多变量)、或按 variables 顺序的数组。', oneOf: [{ type: 'number' }, { type: 'object' }, { type: 'array' }] },
1005
- variables: { type: 'array', items: { type: 'string' }, description: '变量名(多变量或数组候选时必填),如 ["x","y"]。' },
1006
- tolerance: { type: 'number', description: '邻域半径(可选,默认 1e-3),在该邻域内寻找匹配的认证根。' }
993
+ equation: { type: 'string', description: 'A single equation containing an equals sign, e.g. "x^2 = 4".' },
994
+ candidate: { description: 'The claimed answer: a number (single variable, default variable x), {variable:value} for multiple variables, or an array in variables order.', oneOf: [{ type: 'number' }, { type: 'object' }, { type: 'array' }] },
995
+ variables: { type: 'array', items: { type: 'string' }, description: 'Variable names (required for multiple variables or array candidates), e.g. ["x","y"].' },
996
+ tolerance: { type: 'number', description: 'Neighbourhood radius (optional, default 1e-3) within which a matching certified root is searched.' }
1007
997
  },
1008
998
  required: ['equation', 'candidate']
1009
999
  }
1010
1000
  },
1011
1001
  {
1012
1002
  name: 'pay',
1013
- description: '对公收款:为本次/后续求解创建一笔真实付费订单(' + yuan(PRICE_CENTS) + '/次),返回订单号、专属 key 与结构化付款意图(payIntent)。' +
1014
- '统一收款入口 = 工银e支付银联聚合码(支持支付宝/微信/银联扫码),钱落公司对公户,不接任何支付平台商户 API。' +
1015
- '【付款后自助入账·推荐】付款完成后再调一次本工具并传 orderId + selfReportPaid:true,即**立即入账、立即放行**,' +
1016
- '不需要任何人工核对、不需要等对账 —— 本服务按信任制运转(同一道门 honorPaid 本来就免费,' +
1017
- '所以「声明已付款」不会多出任何损失,只是把诚实付款的人从「等入账」里解放出来)。' +
1018
- '若服务端未配置收款方式(LS_PAY_TO 为空),订单仍可创建但 payIntent.payTo 为 null,此时请改用 honorPaid:true 或联系作者。',
1003
+ description: 'Create a real payment order for this or future solving. Returns the order id, a dedicated key, and a structured payment intent. The payment channel is a corporate static collection code (UnionPay aggregate QR) settling into a corporate bank account; no payment-platform merchant API is used. AFTER PAYING: call this tool again with orderId and selfReportPaid:true and the order is credited and released immediately, with no manual check and no waiting for reconciliation, because this service runs on an honor system. If the server has no payment method configured the order is still created but payIntent.payTo is null; use honorPaid:true or contact the operator instead.',
1019
1004
  inputSchema: {
1020
1005
  type: 'object',
1021
1006
  properties: {
1022
- channel: { type: 'string', description: '付款通道:当前固定为 corporate-static(对公静态收款,对公收款);留空即可。' },
1023
- orderId: { type: 'string', description: '自助入账用:上一次 pay 返回的订单号(形如 LS-YYYYMMDD-xxxxxx)。' },
1024
- selfReportPaid: { type: 'boolean', description: '自助入账用:付款完成后置 true,声明「本单已付」。服务端不验证、立即按订单面值入账放行(信任制);入账会标注 amountVerified:false / creditedBy:self_report,便于事后与银行流水核对。' },
1025
- selfReportNote: { type: 'string', description: '可选:付款备注(如付款人/渠道/时间),仅用于对账留痕,长度上限 200。' }
1007
+ channel: { type: 'string', description: 'Payment channel: currently fixed to corporate-static (corporate bank collection). Leave empty.' },
1008
+ orderId: { type: 'string', description: 'For self-reporting: the order id returned by a previous pay call, shaped like LS-YYYYMMDD-xxxxxx.' },
1009
+ selfReportPaid: { type: 'boolean', description: 'For self-reporting: set true after paying to declare that this order was paid. The server does not verify and credits the order amount and releases it immediately (honor system); the credit is marked amountVerified:false / creditedBy:self_report so it can be reconciled against bank statements afterwards.' },
1010
+ selfReportNote: { type: 'string', description: 'Optional payment note (payer, channel, time), kept only for reconciliation, up to 200 characters.' }
1026
1011
  },
1027
1012
  required: []
1028
1013
  }
package/index.html CHANGED
@@ -8,7 +8,10 @@
8
8
  <meta name="description" content="灵数求解器 — 高维代数方程组求解工具,支持导数/积分/ODE/极限,输出确定性解">
9
9
  <link rel="manifest" href="manifest.json">
10
10
  <link rel="icon" href="icon.svg" type="image/svg+xml">
11
- <link rel="apple-touch-icon" href="icon.svg">
11
+ <link rel="apple-touch-icon" href="icon-512.png">
12
+ <meta name="apple-mobile-web-app-capable" content="yes">
13
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
14
+ <meta name="apple-mobile-web-app-title" content="灵数">
12
15
  <title>灵数求解器</title>
13
16
  <style>
14
17
  * {
@@ -11192,7 +11195,7 @@ function _runTail(state) {
11192
11195
 
11193
11196
  // —— 可审计结构化溯源(切片A):每个结果附带完整证据链元数据 ——
11194
11197
  // 设计目标:Agent / 上层系统拿到的不只是裸数字,而是"为什么是这个解"的可读证据链。
11195
- var SOLVER_VERSION = "lingshu-solver/1.0.15";
11198
+ var SOLVER_VERSION = "lingshu-solver/1.0.16";
11196
11199
 
11197
11200
  // —— 确定性可复现契约(Certified Real-Root Computation 六属性之「确定性可复现」)——
11198
11201
  // 纯 JS 同步 SHA-256(零依赖,浏览器/Node 通用,免 Web Crypto 异步)。
@@ -12521,5 +12524,6 @@ function showError(msg) {
12521
12524
  </div>
12522
12525
  <div style="color:#475569;">本网页版永久免费、不限次数、离线计算。托管端点也支持「不付费照常用」(调用时传 honorPaid)。</div>
12523
12526
  </footer>
12527
+ <script>if('serviceWorker' in navigator){navigator.serviceWorker.register('sw.js').catch(function(){});}</script>
12524
12528
  </body>
12525
12529
  </html>
package/mcp-server.js CHANGED
@@ -19,7 +19,7 @@ const path = require('path');
19
19
  const { solve } = require('./solver-core');
20
20
 
21
21
  const SERVER_NAME = 'lingshu-solver';
22
- const SERVER_VERSION = '1.0.15';
22
+ const SERVER_VERSION = '1.0.16';
23
23
 
24
24
  // ---- 护栏常量(防畸形/恶意输入耗尽资源)----
25
25
  const MAX_TOTAL_CHARS = 100 * 1024; // 单次请求方程文本总长上限 100KB
@@ -233,69 +233,62 @@ function doVerify(args) {
233
233
  const TOOLS = [
234
234
  {
235
235
  name: 'solve',
236
- description: '求解实数方程组的确定性数值引擎(非大模型,无随机、同输入输出可复现)。适用:需可验证、可复现的实数解(代数或 sin/cos/tan/log/exp/sqrt/abs 等常见超越函数),尤其给 AI Agent 当"不会胡说"的数学后端。' +
237
- '不适用:纯符号推导/闭式证明、微分方程初值问题、整数/必不等于等强制约束(暂不支持)。' +
238
- '输入:equations 为含 "=" 的方程字符串数组,如 ["x^2+y^2=25","x+y=7"];variables 可选(不填自动识别,最多6个);domain 可选(如 {"x":[-30,30]}),否则默认每变量 ±1e6。' +
239
- '硬限制:变量 ≤6;方程 1–64 条且数量须 ≥ 变量数;单次方程文本 ≤100KB;输出固定 6 位小数(不可切换)。' +
240
- '输出(JSON):resultType=empty(严格证无实数解)/finite(有限已验证解)/infinite(无限解集,仅给距原点最近推荐解);summary=中文一句话总览;solutions[] 每解含 values[](6位小数数值)、tier(proven=Krawczyk已认证/likely/candidate)、certified、text(人类可读如"x=4.000000, y=3.000000"),残差等内部数值收在 internals 子块(机器可跳过);certified=是否全proven;recommended=距原点最近解的精简结构。' +
241
- 'truncated=true:预算内未完成全局分支判定、未证明已穷尽——不等于一定漏解,多数情况全部真解已找到;极端病态下可能遗漏个别解,可缩 domain 或提高 budget 重试。' +
242
- '错误返回 error.type(invalid_input=输入不合法/超限,internal_error=内部异常)。遇卡点或认为结果有误,请调用 give_feedback(内容仅落本地日志,不外传)。相同输入永远返回完全相同结果,可安全缓存与重复调用。',
236
+ description: 'Deterministic solver for systems of real equations. This is not a language model: no randomness, and identical input always returns an identical, reproducible result. Use it when you need a verifiable, reproducible numeric answer for algebraic equations or common transcendentals (sin/cos/tan/log/exp/sqrt/abs); it works well as a non-hallucinating math backend for an AI agent. Not suitable for symbolic algebra, closed-form proofs, initial-value ODEs, or mandatory integer equality. INPUT: equations (array of strings containing an equals sign, e.g. ["x^2+y^2=25","x+y=7"]); supported operators + - * / ^ sqrt log sin cos tan exp abs, with in-text domain constraints such as x in [-30,30]; variables (optional, auto-detected, max 6); domain (optional, e.g. {"x":[-30,30]}), defaulting to +/-1e6 per variable. HARD LIMITS: at most 6 variables; 1 to 64 equations and the equation count must be at least the variable count; up to 100KB of equation text per call; output is fixed at 6 decimal places and is not configurable. OUTPUT (JSON): resultType is empty (no real solutions, proven), finite (finite verified solutions) or infinite (infinite solution set, only the recommended nearest-to-origin solution is given); summary; solutions[] with values[] (6-decimal numbers), tier (proven means Krawczyk-certified, otherwise likely or candidate), certified, text; residual and other internals under internals; recommended holds the compact nearest-to-origin structure. truncated=true means the global branch-and-bound did not finish inside the budget; it does not necessarily mean solutions were missed and in most cases every real solution was found; narrow the domain or raise options.budget and retry if you need a completeness guarantee. Errors return error.type (invalid_input or internal_error). If something looks wrong, call give_feedback rather than guessing. The same input always produces the exact same output, so caching and retries are safe. PAYMENT: this endpoint is free to use. Pass honorPaid:true to declare personal or evaluation use and the call is served with no verification and no balance deduction; payment is voluntary and never enforced.',
243
237
  inputSchema: {
244
238
  type: 'object',
245
239
  properties: {
246
240
  equations: {
247
241
  type: 'array', items: { type: 'string' },
248
- description: '方程字符串数组,如 ["x^2 + y^2 = 25", "x + y = 7"]。支持 + - * / ^ sqrt log sin cos tan exp abs,以及 in-text 域约束 "x ∈ [-30,30]"。'
242
+ description: 'Array of equation strings, e.g. ["x^2 + y^2 = 25", "x + y = 7"]. Supports + - * / ^ sqrt log sin cos tan exp abs, plus in-text domain constraints such as x in [-30,30].'
249
243
  },
250
244
  variables: {
251
245
  type: 'array', items: { type: 'string' },
252
- description: '变量名数组(可选)。不填则由方程文本自动识别,顺序按出现。最多 6 个。'
246
+ description: 'Variable names (optional). If omitted they are auto-detected from the equation text, in order of appearance. Maximum 6.'
253
247
  },
254
248
  domain: {
255
249
  type: 'object',
256
- description: '显式搜索域(可选)。形如 {"x":[-30,30],"y":[-30,30]}。对"有限解·部分"演示或快增长函数(exp/sinh)建议显式给定,否则默认 ±1e6 可能剪枝失效并触发 truncated。'
250
+ description: 'Explicit search domain (optional), e.g. {"x":[-30,30],"y":[-30,30]}. Recommended for near-infinite solution sets or fast-growing functions such as exp or sinh; without it the default +/-1e6 may fail to prune and set truncated.'
257
251
  },
258
- fastMode: { type: 'boolean', description: '快速模式(默认 false)' },
259
- options: { type: 'object', description: '高级选项(可选),如 {budget:500000, maxDepth:28}' }
252
+ fastMode: { type: 'boolean', description: 'Fast mode (default false).' },
253
+ options: { type: 'object', description: 'Advanced options (optional), e.g. {budget:500000, maxDepth:28}' }
260
254
  },
261
255
  required: ['equations']
262
256
  }
263
257
  },
264
258
  {
265
259
  name: 'give_feedback',
266
- description: 'AI 智能体在调用 solve 遇到卡点、错误、或认为结果有问题时,主动回报。' +
267
- '回报内容仅落本地 feedback.log,不会外传。帮助作者持续改进。',
260
+ description: 'Report a problem to the operator when solve hits a dead end, returns an error, or produces something you believe is wrong. The text is written to a local log only and is never transmitted anywhere else.',
268
261
  inputSchema: {
269
262
  type: 'object',
270
263
  properties: {
271
- message: { type: 'string', description: '反馈内容:遇到了什么、期望什么、实际得到什么。' },
272
- context: { type: 'string', description: '可选上下文:触发场景、输入特征等。' }
264
+ message: { type: 'string', description: 'What you hit, what you expected, and what you actually got.' },
265
+ context: { type: 'string', description: 'Optional context: the triggering scenario or input characteristics.' }
273
266
  },
274
267
  required: ['message']
275
268
  }
276
269
  },
277
270
  {
278
271
  name: 'poly_roots',
279
- description: '多项式全部实根,逐个 Krawczyk 认证(带严格误差盒)。输入系数「最高次在前」,如 [1,-2,-5,6] 表示 x³−2x²−5x+6。确定性、可复现、可证明正确;复数根不返回(本品只做实数)。给 AI Agent 当「可靠的多项式求根件」——不会再像通用 LLM 那样把根算错或半对。',
272
+ description: 'All real roots of a polynomial, each individually certified by Krawczyk with a strict error box. Coefficients are ordered highest degree first, so [1,-2,-5,6] means x^3-2x^2-5x+6. Deterministic and reproducible; complex roots are not returned (real numbers only). Use it as a reliable polynomial root component instead of letting a general language model estimate roots. Free to use: pass honorPaid:true to declare personal or evaluation use.',
280
273
  inputSchema: {
281
274
  type: 'object',
282
275
  properties: {
283
- coefficients: { type: 'array', items: { type: 'number' }, description: '多项式系数,最高次在前。如 [1,-2,-5,6] 对应 x³−2x²−5x+6。' },
284
- tolerance: { type: 'number', description: '根的判定容差(可选,默认内部精度)' }
276
+ coefficients: { type: 'array', items: { type: 'number' }, description: 'Polynomial coefficients, highest degree first. [1,-2,-5,6] means x^3-2x^2-5x+6.' },
277
+ tolerance: { type: 'number', description: 'Tolerance used to decide a root (optional; internal precision is used by default).' }
285
278
  },
286
279
  required: ['coefficients']
287
280
  }
288
281
  },
289
282
  {
290
283
  name: 'verify',
291
- description: '核验一个「声称的答案」到底对不对——这是「LLM 猜了 2.1、真根是精确 2」的检查。输入方程 + 候选值/点(数字,或 {变量:值},或按 variables 顺序的数组),本工具在候选点邻域内调用同一套认证内核:若找到与之匹配的认证根 → 返回 verified + 误差盒;若找不到 → 返回 refuted 并附上最近的认证根(让 Agent 立刻看到正确值)。确定性、非 LLM、结果可复现。',
284
+ description: 'Check whether a claimed answer is correct. Give the equation plus a candidate value (a number for a single variable, {variable:value} pairs, or an array in variable order); the same certified kernel runs in a neighbourhood around the candidate. If a matching certified root is found the result is verified together with the error box; otherwise it is refuted and the nearest certified root is returned, so the calling agent immediately sees the correct value. Deterministic, not an LLM, reproducible across calls. Free to use: pass honorPaid:true to declare personal or evaluation use.',
292
285
  inputSchema: {
293
286
  type: 'object',
294
287
  properties: {
295
- equation: { type: 'string', description: '含 "=" 的方程,如 "x^2 = 4"。' },
296
- candidate: { description: '声称的答案:数字(单变量,默认变量 x)、{变量:值}(多变量)、或按 variables 顺序的数组。', oneOf: [{ type: 'number' }, { type: 'object' }, { type: 'array' }] },
297
- variables: { type: 'array', items: { type: 'string' }, description: '变量名(多变量或数组候选时必填),如 ["x","y"]。' },
298
- tolerance: { type: 'number', description: '邻域半径(可选,默认 1e-3),在该邻域内寻找匹配的认证根。' }
288
+ equation: { type: 'string', description: 'A single equation containing an equals sign, e.g. "x^2 = 4".' },
289
+ candidate: { description: 'The claimed answer: a number (single variable, default variable x), {variable:value} for multiple variables, or an array in variables order.', oneOf: [{ type: 'number' }, { type: 'object' }, { type: 'array' }] },
290
+ variables: { type: 'array', items: { type: 'string' }, description: 'Variable names (required for multiple variables or array candidates), e.g. ["x","y"].' },
291
+ tolerance: { type: 'number', description: 'Neighbourhood radius (optional, default 1e-3) within which a matching certified root is searched.' }
299
292
  },
300
293
  required: ['equation', 'candidate']
301
294
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lingshu-solver",
3
- "version": "1.0.15",
4
- "description": "灵数求解器 · 确定性实数方程组求解 MCP 工具(≤6变量):区间收缩 + Krawczyk 认证,离线零依赖零数据,诚实标记 truncated。本地 stdio 永久免费;另有常驻托管端点 https://hongchenlingjing.com/mcp(按次 ¥0.01/次,支持 honorPaid 免费放行)。",
3
+ "version": "1.0.16",
4
+ "description": "Lingshu Solver — deterministic (non-LLM) MCP tool for solving systems of real equations, up to 6 variables: interval arithmetic + affine arithmetic + constructive Krawczyk certification, zero dependencies, offline, no data upload, unproven-completeness honestly flagged as truncated. Local stdio is permanently free; the hosted endpoint works without paying via honorPaid. Hosted endpoint: https://hongchenlingjing.com/mcp",
5
5
  "homepage": "https://genesis-plan.github.io/lingshu-solver/",
6
6
  "repository": {
7
7
  "type": "git",