dsh-vibe-math 2.0.12 → 2.0.13

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 — THREE agent presets in one install: vibe-math-v2 (probability-driven: qs.json + Propos knowledge base + explorer→solver→review/debate verdict), vibe-math-v3 (THIRD-generation, recommended: 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). Installing this bundle auto-installs all three presets (v1 was removed at v2.0.0).",
4
- "version": "2.0.12",
4
+ "version": "2.0.13",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": "^22.19.0 || >=24.0.0"
@@ -727,10 +727,19 @@ export function apply(ctx) {
727
727
  // disk and re-seed the resumed run). Same-process pause→resume keeps continuable ids.
728
728
  const crossProcess = persistedEpoch !== processEpoch
729
729
  if(crossProcess){ for(const [,r] of residents){ r.childId=''; r.status='brainstorm'; r.roundsSinceCompact=0 } }
730
+ // ANY re-spawn (cross-process OR a same-process abort that already cleared childIds) must get a FRESH
731
+ // coordination/concurrency state and a brainstorm phase. Otherwise: re-spawned brainstorm residents run
732
+ // under phase='active' (brainstorm summary never written), and a LATE subagent/end from an interrupted
733
+ // OLD resident (same rId) deletes the NEW resident's busy mark → A-fill can wake it mid-brainstorm.
734
+ const needRespawn = Array.from(residents.values()).some(r=>!r.childId)
735
+ if(needRespawn){
736
+ for(const [,r] of residents){ r.childId=''; r.status='brainstorm'; r.insight=''; r.roundsSinceCompact=0 }
737
+ busy=new Set(); wakeKind=new Map(); currentResident=''; pendingMeeting=null; pendingVerify=null; verifyState=null; meetingState=null
738
+ }
730
739
  for(const [,r] of residents){ if(!r.childId){ await spawnResident(r) } }
731
740
  if(!running){ running=true; autoDone=false; if(phase==='idle') phase='active' }
732
- if(crossProcess && phase==='active') phase='brainstorm' // let re-spawned residents re-bootstrap together
733
- logActivity('resume','restarted'+(crossProcess?' (cross-process: re-spawned)':'')); await saveAll(); await scheduleNext(); return {ok:true,message:'resumed',project:currentProject}
741
+ if(needRespawn && phase!=='brainstorm') phase='brainstorm' // let re-spawned residents re-bootstrap together
742
+ logActivity('resume','restarted'+(crossProcess?' (cross-process: re-spawned)':needRespawn?' (re-spawned)':'')); await saveAll(); await scheduleNext(); return {ok:true,message:'resumed',project:currentProject}
734
743
  }
735
744
  function status(){ return { ok:true, running, phase, autoDone, project:currentProject, residentCount:residents.size,
736
745
  residents:listResidents(), busy:[...busy], taskboard:taskboard.length,
@@ -367,6 +367,7 @@ VibeMath/Projects/<project>/
367
367
  | **非全票验证不写回平均概率** | `finalizeVerify` 算出 `avg` 只写进辩论录,源卡 `- 概率:` 保持原值,未兑现设计 §8"留库附概率"。 | 新增 `findSourceRel`/`rewriteSourceProb`,非全票时把 `avg` 写回源卡 `- 概率:`(状态仍 `未定论`)。 |
368
368
  | **方法型验证被误标为"命题"** | `writeVerifiedCard` 把方法目标写进 `Verified/命题/` 且类型=命题。 | 按 `targetType` 标 `类型: 方法`(子问题→问题,方法→方法,其余→命题),来源卡标 `已验证·真/假`。 |
369
369
  | **同进程 abort→resume 不重建常驻** | `processEpoch` 进程级,同进程 abort(interrupt 杀掉常驻)后 resume 判非跨进程→保留死 childId;且 `phase=idle && !running` 时 resume 直接拒绝。 | `initAbort` 清空 `childId` 并 `saveAll()`;`resume` 守卫改为 `phase==='idle' && !running && residents.size===0`(有常驻即可 重建)。 |
370
+ | **abort→resume 重种化不彻底(牵连修复)** | 同进程 abort 后 `phase='idle'`、childId 已清空,但旧居民 `status='active'` 且旧 `insight` 仍在;resume 走"非跨进程"分支不清状态,直接 re-spawn 后落入 `phase='active'`——重种化居民在第一轮 brainstorm 期间就被当作 active 处理(brainstorm 汇总不写);且被 interrupt 的**旧**居民迟到的 `subagent/end`(同名 rId)会删除**新**居民的 busy 标记。 | `resume()` 用 `needRespawn`(任一 childId 为空)统一判定:**任何 re-spawn(跨进程或同进程 abort)** 都清空 busy/wakeKind/currentResident/pendingMeeting/pendingVerify/verifyState/meetingState,并把居民 `status='brainstorm'`、`insight=''`、`phase='brainstorm'`——让重种化居民真正重新头脑风暴、汇总正常写出、旧居民的迟到 end 不会污染新居民的 busy。 |
370
371
  | **自动同步会议计数不一致** | `bumpArtifacts` 只在记录方法/子问题时调用,`recordProposition`/`publish_progress` 不计;`artifactCount` 未持久化。 | `recordProposition` 也 `bumpArtifacts()`;`artifactCount` 持久化到 `session.json` 并在 `start()` 时清零。 |
371
372
  | **唤醒信号硬编码 60s** | `spawnResident`/`wakeResident` 用 `makeSignal(60000)`,比 `activityTimeoutMs`(120s) 短。 | 改用 `makeSignal(params.activityTimeoutMs||60000)`。 |
372
373
  | **`verdictMaxRounds`/`meetingKeepEvery` 不可调/不展示** | `verdictMaxRounds` 不在 `vibe_v4_set` schema;两者都不在 `status()` 参数串。 | `vibe_v4_set` 增加 `verdictMaxRounds`;`status()` 参数串补 `meetingKeepEvery` 与 `verdictMaxRounds`。 |