dsh-vibe-math 0.3.10 → 0.3.11

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/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 — TWO agent presets in one install: vibe-math-v1 (classic pipeline: brainstorm → solver iteration → multi-verifier debate → Verified) and vibe-math-v2 (new probability-driven architecture: qs.json + Propos knowledge base + explorer→solver→review/debate verdict). Installing this bundle auto-installs both presets into the DSH preset root.",
4
- "version": "0.3.10",
4
+ "version": "0.3.11",
5
5
  "type": "module",
6
6
  "main": "installer.js",
7
7
  "exports": {
@@ -663,7 +663,7 @@ export function apply(ctx) {
663
663
  const proofs = p.证明列表 || []; const refutes = p.证伪列表 || []
664
664
  for (let j = 0; j < proofs.length; j++) { const it = proofs[j]; sols.push({ 完整解法: '【证明】' + (it.完整过程 || ''), 正确概率: clamp01(it.正确概率 != null ? it.正确概率 : 0.5), 已验: !!it.已验, 来源: '由命题晋升(证明#' + j + ')', 来源命题: p.id, 来源列表: '证明', 来源索引: j, 验证记录: [] }) }
665
665
  for (let j = 0; j < refutes.length; j++) { const it = refutes[j]; sols.push({ 完整解法: '【证伪】' + (it.完整过程 || ''), 正确概率: clamp01(it.正确概率 != null ? it.正确概率 : 0.5), 已验: !!it.已验, 来源: '由命题晋升(证伪#' + j + ')', 来源命题: p.id, 来源列表: '证伪', 来源索引: j, 验证记录: [] }) }
666
- qs.push({ id: qid, 概述: '判断下述命题是否成立:' + p.概述, 已解决: false, 解法列表: sols, 优先级: 1, 细类型: (p.细类型 && typeof p.细类型 === 'object') ? p.细类型 : {}, '价值/关键性': p['价值/关键性'], progress: '由命题 ' + p.id + '(价值/关键性=' + p['价值/关键性'] + ')自动晋升;目标:证明或证伪该命题(解法列表中的【证明】/【证伪】条目即原命题的证明/证伪材料,验证结果会回写源命题)。' })
666
+ qs.push({ id: qid, 概述: '判断下述命题是否成立:' + p.概述, 已解决: false, 解法列表: sols, 优先级: 1, 判断命题: p.id, 细类型: (p.细类型 && typeof p.细类型 === 'object') ? p.细类型 : {}, '价值/关键性': p['价值/关键性'], progress: '由命题 ' + p.id + '(价值/关键性=' + p['价值/关键性'] + ')自动晋升;目标:证明或证伪该命题(解法列表中的【证明】/【证伪】条目即原命题的证明/证伪材料,验证结果会回写源命题)。' })
667
667
  p.在问题清单 = true
668
668
  await upsertProposition(p)
669
669
  await writeQs(qs)
@@ -703,6 +703,7 @@ export function apply(ctx) {
703
703
  for (let i = 0; i < propos.length; i++) {
704
704
  const p = propos[i]
705
705
  if (p.布尔估计 === 1 || p.布尔估计 === 0 || p.优先级 === 'never') continue
706
+ if (p.在问题清单) continue // 已晋升:其证明/证伪经晋升问题的解法验证,避免同一内容双重验证
706
707
  const proofs = p.证明列表 || []; const refutes = p.证伪列表 || []
707
708
  if (proofs.length === 0 && refutes.length === 0) {
708
709
  out.push({ rId: 'r-' + p.id, kind: 'proposition', pId: p.id, 概述: p.概述, prob: Number(p.布尔估计) || 0, priority: p.优先级 === 'never' ? 999 : Number(p.优先级) })
@@ -882,7 +883,7 @@ export function apply(ctx) {
882
883
  const judgeId = qid + '-judge-' + shortId()
883
884
  const assumeStatement = sq.assumption_statement || sq.assumption_title || ('对子问题「' + (sq.q_sub_title || sq.q_sub_statement) + '」的一种回答(临时假设)')
884
885
  qs.push({ id: subId, 概述: sq.q_sub_statement, 已解决: false, 解法列表: [], 优先级: 1, progress: '临时子问题:由问题 ' + qid + ' 方向 ' + dirId + ' 分支产生;求解主线在 p_{q-tmp}(' + assumeId + ')假设下推进。' })
885
- qs.push({ id: judgeId, 概述: '判断下述命题是否成立:' + assumeStatement, 已解决: false, 解法列表: [], 优先级: 1, progress: '由临时假设 p_{q-tmp}(' + assumeId + ')生成;它是对子问题 ' + subId + ' 的一种回答的命题化。' })
886
+ qs.push({ id: judgeId, 概述: '判断下述命题是否成立:' + assumeStatement, 已解决: false, 解法列表: [], 优先级: 1, 判断命题: assumeId, progress: '由临时假设 p_{q-tmp}(' + assumeId + ')生成;它是对子问题 ' + subId + ' 的一种回答的命题化。' })
886
887
  await writeQs(qs)
887
888
  const p = {
888
889
  id: assumeId, 概述: assumeStatement, 布尔估计: 0.5,
@@ -1062,6 +1063,19 @@ export function apply(ctx) {
1062
1063
  }
1063
1064
  }
1064
1065
  }
1066
+ // 点5 联动:「判断下述命题是否成立:X」问题的**新解法**验证结果 → X 命题收口
1067
+ // (转移条目走上面来源联动 + processStatusUpdates 按证明/证伪侧向收口;这里只处理无来源的新解法)
1068
+ if (q.判断命题 && !sol.来源列表) {
1069
+ const ap = await findProposition(q.判断命题)
1070
+ if (ap) {
1071
+ ap.布尔估计 = v
1072
+ if (v === 1) { ap.证明列表 = ap.证明列表 || []; ap.证明列表.push({ 完整过程: strongestReason(t, 1) || '判断问题解法验证通过', 正确概率: 1, '支持信息/依据': '经「判断下述命题是否成立」问题解法验证', 已验: true }); ap.优先级 = 'never' }
1073
+ else if (v === 0) { ap.证伪列表 = ap.证伪列表 || []; ap.证伪列表.push({ 完整过程: strongestReason(t, 0) || '判断问题解法判定不成立', 正确概率: 1, '支持信息/依据': '经「判断下述命题是否成立」问题解法验证', 已验: true }); ap.优先级 = 'never' }
1074
+ await upsertProposition(ap)
1075
+ await writeVerifiedCardIfNeeded(ap)
1076
+ logActivity('judge-sync', 'judge problem verdict ' + v + ' synced to proposition ' + ap.id)
1077
+ }
1078
+ }
1065
1079
  if (v === 1) { q.已解决 = true; q.优先级 = 'never'; await writeVerifiedProblemCardIfNeeded(q) }
1066
1080
  }
1067
1081
  await writeQs(qs)