dsh-vibe-math 2.0.9 → 2.0.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 — 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.9",
4
+ "version": "2.0.11",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": "^22.19.0 || >=24.0.0"
@@ -419,7 +419,7 @@ export function apply(ctx) {
419
419
  const votes=Object.values(st.inputs).map(x=>x.voteSolved).filter(v=>typeof v==='boolean')
420
420
  const allSolved = allSpoke && votes.length>0 && votes.every(v=>v===true)
421
421
  logActivity('meeting', 'concluded'+(allSolved?' → ALL agree solved':' (no unanimous solved vote)'))
422
- if(allSolved){ running=false; autoDone=true; phase='done'; logActivity('stop','all residents agree: problem solved'); await saveAll(); return }
422
+ if(allSolved){ running=false; autoDone=true; phase='done'; clearHeartbeat(); logActivity('stop','all residents agree: problem solved'); await saveAll(); return }
423
423
  meetingState=null; wakeKind.clear(); await saveAll(); await scheduleNext()
424
424
  }
425
425
 
@@ -604,7 +604,10 @@ export function apply(ctx) {
604
604
  await saveAll()
605
605
  if(!ok) continue // a failed wake must NOT stop the fill; try the next idle resident
606
606
  }
607
- if(started>0) { return } // at least one started; their onResidentEnd re-drives scheduleNext
607
+ if(started>0) { armHeartbeat(); return } // started some; re-drive comes via onResidentEnd, BUT also arm a
608
+ // safety-net heartbeat so a woken resident whose subagent/end NEVER arrives (a hung normal round) does not
609
+ // freeze the group. Below mp, the next scheduleNext will re-fill; if all woken residents are stuck busy the
610
+ // heartbeat just re-arms harmlessly. (Meeting/verify already have recoverStallMs watchdogs; normal A-fill did not.)
608
611
  // everyone is busy or not idle-enough: arm a heartbeat to re-check later (no infinite spin)
609
612
  armHeartbeat()
610
613
  }
@@ -705,6 +708,7 @@ export function apply(ctx) {
705
708
  running=true; autoDone=false; phase='brainstorm'
706
709
  await writeText('Problems/'+problemId+'.md','# 问题|'+problemId+'\n- ID: '+problemId+'\n- 类型: 问题\n- 状态: 求解中\n- 优先级: 1\n- 依赖: []\n\n## 陈述\n'+problemText+'\n')
707
710
  residents=new Map(); mailboxes=new Map(); taskboard=[]; decisions=[]; meetings=[]; reports=[]; verifyState=null; meetingState=null; pendingVerify=null; residentSeq=0; artifactCount=0; clearHeartbeat()
711
+ busy=new Set(); wakeKind=new Map(); currentResident=''; pendingMeeting=null; lastSyncMeetingAt=0 // fresh run must NOT inherit stale concurrency/coordination state (busy/wakeKind/currentResident/pendingMeeting) from a previous run on the same reused session
708
712
  lastActivityAt=now(); lastProgressAt=now() // fresh stall/activity clock for the new run (else B could fire immediately on a reused session)
709
713
  const dirs=Array.isArray(seedDirections)?seedDirections.slice(0,params.residentCount):[]
710
714
  for(let i=0;i<params.residentCount;i++){ const r=newResident(dirs[i]||''); await spawnResident(r) }