lingshu-solver 1.0.17 → 1.0.18

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.
@@ -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.17';
50
+ const SERVER_VERSION = '1.0.18';
51
51
  const PORT = parseInt(process.env.PORT || '3000', 10);
52
52
 
53
53
  // ---- 护栏常量(防畸形/恶意输入耗尽资源,与 stdio 版一致)----
@@ -634,28 +634,39 @@ function pricingDoc(req) {
634
634
  requireTls: REQUIRE_TLS ? 'on' : 'off',
635
635
  account: {
636
636
  required: false,
637
- model: '凭证即账号(API key 就是身份,也是余额载体)。不设注册、不设密码、不设用户名。',
637
+ model: METERING_ON
638
+ ? '凭证即账号(API key 就是身份,也是余额载体)。不设注册、不设密码、不设用户名。'
639
+ : '免费开放,不需要账号:不设注册、不设密码、不设用户名、不需要凭证即可调用。',
638
640
  personalDataCollected: false,
639
641
  note: '本服务不收集、不存储任何个人信息(姓名/电话/邮箱/微信号等)。服务端只留凭证的 SHA-256、订单与余额元数据,以及调用来源 IP(仅用于防刷与计费对账,不用于用户画像、不向第三方提供)。你在建单时提交的任何联系方式与备注一律丢弃、不落盘。凭证明文仅在建单响应中出现一次,请自行保存;遗失可用订单号联系作者轮换(/admin/rotate)。',
640
642
  recovery: '凭证遗失:凭订单号联系作者轮换,新凭证继承余额,旧凭证立即失效。若订单号与凭证明文同时丢失,则无法找回余额——请至少保存订单号。'
641
643
  },
642
- price: {
644
+ price: METERING_ON ? {
643
645
  centsPerCall: PRICE_CENTS,
644
646
  display: yuan(PRICE_CENTS) + ' / 次',
645
647
  currency: 'CNY',
646
648
  unit: 'per successful solve call',
647
649
  billingRule: '仅当 solve 成功产出求解结果时扣费;输入不合法、方程无法解析(响应里 diagnostics.inputError 非空)、内部错误、余额不足,一律不扣费。'
650
+ } : {
651
+ free: true,
652
+ note: '托管端点当前免费开放:不限次数、不需要凭证、不产生任何扣费。'
648
653
  },
649
- model: '按次付费:每次 solve 固定收费 ' + PRICE_CENTS + ' 分钱(' + yuan(PRICE_CENTS) + '),不预充、无其他金额、无其他档位。',
654
+ model: METERING_ON
655
+ ? ('按次付费:每次 solve 固定收费 ' + PRICE_CENTS + ' 分钱(' + yuan(PRICE_CENTS) + '),不预充、无其他金额、无其他档位。')
656
+ : '免费:托管端点不限次数、无需凭证、无任何扣费。愿意支持的可以用对公静态收款自愿给一笔,不是强制,也不是账单。',
657
+ freeModeNote: '本产品定位为免费开放的能力层(open-core):网页版、npx 本地安装、托管远程端点一律免费,可被其它产品集成调用。',
650
658
  freeTools: ['initialize', 'tools/list', 'give_feedback', 'GET /credit', 'GET /pricing'],
651
659
  auth: 'Authorization: Bearer <key>(亦支持 x-api-key 请求头)',
652
- howToBuy: [
660
+ howToBuy: METERING_ON ? [
653
661
  'POST ' + base + '/pay/order (每次一笔 1 分钱订单;body 不支持 calls/plan 预购,下单恒为 1 次)',
654
662
  '响应给出 orderId 与 apiKey(apiKey 只出现一次,请立即保存)',
655
663
  '向对公聚合码/账户付款(备注建议含订单号)',
656
664
  '★ 付款完成后自助入账:调 MCP pay 工具,入参 {"orderId":"<订单号>","selfReportPaid":true} → 立即入账、立即放行(零人工、不用等对账)',
657
665
  'GET ' + base + '/pay/order?orderId=<id> 查询订单状态',
658
666
  'GET ' + base + '/credit 携带 key 查询余额(免费)'
667
+ ] : [
668
+ '现在不需要任何付款步骤——直接调 POST ' + base + '/mcp 即可,无凭证也能解。',
669
+ '若愿意支持:POST ' + base + '/pay/order 建单后向对公静态收款自愿给任意金额,仍走「付款方自助入账」,属自愿支持、不是账单。'
659
670
  ],
660
671
  legal: {
661
672
  positioning: '本服务定性为「软件授权 / 技术服务」的计算工具,非经营性互联网信息服务。',
package/index.html CHANGED
@@ -11195,7 +11195,7 @@ function _runTail(state) {
11195
11195
 
11196
11196
  // —— 可审计结构化溯源(切片A):每个结果附带完整证据链元数据 ——
11197
11197
  // 设计目标:Agent / 上层系统拿到的不只是裸数字,而是"为什么是这个解"的可读证据链。
11198
- var SOLVER_VERSION = "lingshu-solver/1.0.17";
11198
+ var SOLVER_VERSION = "lingshu-solver/1.0.18";
11199
11199
 
11200
11200
  // —— 确定性可复现契约(Certified Real-Root Computation 六属性之「确定性可复现」)——
11201
11201
  // 纯 JS 同步 SHA-256(零依赖,浏览器/Node 通用,免 Web Crypto 异步)。
@@ -12520,9 +12520,9 @@ function showError(msg) {
12520
12520
  <div style="margin-bottom:8px;">
12521
12521
  <a href="/privacy.html" style="color:#94a3b8;">隐私与安全说明</a> ·
12522
12522
  <a href="https://hongchenlingjing.com/mcp" style="color:#94a3b8;">远程调用端点 hongchenlingjing.com/mcp</a> ·
12523
- <a href="https://hongchenlingjing.com/pay/" style="color:#94a3b8;">支持这个工具(托管端点 ¥0.01/次,付款后立即生效)</a>
12523
+ <a href="https://hongchenlingjing.com/pay/" style="color:#94a3b8;">支持这个工具(自愿支持,任意金额,不付款也完全可用)</a>
12524
12524
  </div>
12525
- <div style="color:#475569;">本网页版永久免费、不限次数、离线计算。托管端点也支持「不付费照常用」(调用时传 honorPaid)。</div>
12525
+ <div style="color:#475569;">本网页版永久免费、不限次数、离线计算;托管端点同样免费开放——不需要凭证、不需要声明。</div>
12526
12526
  </footer>
12527
12527
  <script>if('serviceWorker' in navigator){navigator.serviceWorker.register('sw.js').catch(function(){});}</script>
12528
12528
  </body>
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.17';
22
+ const SERVER_VERSION = '1.0.18';
23
23
 
24
24
  // ---- 护栏常量(防畸形/恶意输入耗尽资源)----
25
25
  const MAX_TOTAL_CHARS = 100 * 1024; // 单次请求方程文本总长上限 100KB
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lingshu-solver",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "mcpName": "io.github.genesis-plan/lingshu-solver",
5
5
  "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",
6
6
  "homepage": "https://genesis-plan.github.io/lingshu-solver/",