dsh-vibe-math 2.0.6 → 2.0.7

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.6",
4
+ "version": "2.0.7",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": "^22.19.0 || >=24.0.0"
@@ -587,7 +587,7 @@ export function apply(ctx) {
587
587
  if(msgs.length===0) continue
588
588
  const m=msgs.shift(); const r=residents.get(to); if(!r){ continue }
589
589
  if(!busy.has(to)){ currentResident=to; await wakeResident(r, (await normalPrompt(r))+'\n\n[MESSAGE from '+m.from+']\n'+m.content,'normal'); await saveAll(); return true }
590
- msgs.push(m); return false
590
+ msgs.push(m); continue // recipient busy → keep the message queued, try another mailbox (avoid starving others)
591
591
  }
592
592
  return false
593
593
  }
@@ -649,12 +649,14 @@ export function apply(ctx) {
649
649
  running=true; autoDone=false; phase='brainstorm'
650
650
  await writeText('Problems/'+problemId+'.md','# 问题|'+problemId+'\n- ID: '+problemId+'\n- 类型: 问题\n- 状态: 求解中\n- 优先级: 1\n- 依赖: []\n\n## 陈述\n'+problemText+'\n')
651
651
  residents=new Map(); mailboxes=new Map(); taskboard=[]; decisions=[]; meetings=[]; reports=[]; verifyState=null; meetingState=null; pendingVerify=null; residentSeq=0; artifactCount=0; clearHeartbeat()
652
+ lastActivityAt=now(); lastProgressAt=now() // fresh stall/activity clock for the new run (else B could fire immediately on a reused session)
652
653
  const dirs=Array.isArray(seedDirections)?seedDirections.slice(0,params.residentCount):[]
653
654
  for(let i=0;i<params.residentCount;i++){ const r=newResident(dirs[i]||''); await spawnResident(r) }
654
655
  await saveAll(); return {ok:true,message:'v4 started: '+params.residentCount+' resident(s) brainstorming',project:currentProject}
655
656
  }
656
657
  async function resume(){
657
658
  currentProject=await readCurrentProject(); await ensureDirs(); await loadAll(); await loadSettings()
659
+ lastActivityAt=now(); lastProgressAt=now() // pause must not count as stall time; a resumed run gets a fresh clock
658
660
  if(phase==='idle' && !running && residents.size===0) return {ok:false,message:'nothing to resume'}
659
661
  // If the persisted State came from a DIFFERENT process (crash/restart), the saved
660
662
  // childIds are stale; clear them so residents re-spawn (their libraries persist on
@@ -668,11 +670,14 @@ export function apply(ctx) {
668
670
  }
669
671
  function status(){ return { ok:true, running, phase, autoDone, project:currentProject, residentCount:residents.size,
670
672
  residents:listResidents(), busy:[...busy], taskboard:taskboard.length,
673
+ meetingInProgress: !!(meetingState), verifyInProgress: !!(verifyState), pendingVerify: pendingVerify?pendingVerify.targetId:null,
671
674
  params:['residentCount','compactAfterRounds','compactThreshold','maxParallel','activityTimeoutMs','meetingKeepEvery','verdictMaxRounds','stallAutoMeetingMs','provider','model','residentPersona','toolAllow','toolDeny'].map(k=>k+'='+(Array.isArray(params[k])?params[k].join(','):params[k])).join(', ') } }
672
675
  function report(){ return { ok:true, running, phase, autoDone, project:currentProject, problem:problemText,
673
676
  residents:listResidents(), taskboard:taskboard.filter(t=>t.status!=='done'),
674
- verify: verifyState?{target:verifyState.targetId,stage:verifyState.stage}:null, meetings:meetings.length,
675
- recentActivity: activityLog.slice(-8) } }
677
+ meeting: meetingState?{id:meetingState.id, agenda:meetingState.agenda, spoke:Object.keys(meetingState.inputs).length+'/'+residents.size}:null,
678
+ verify: verifyState?{target:verifyState.targetId,stage:verifyState.stage, voted:Object.keys(verifyState.verdicts).length+'/'+residents.size}:null,
679
+ pendingVerify: pendingVerify?pendingVerify.targetId:null,
680
+ meetings:meetings.length, recentActivity: activityLog.slice(-8) } }
676
681
  async function addMember(direction){ const r=newResident(direction||''); await spawnResident(r); return {ok:true,id:r.rId,direction:r.direction} }
677
682
  async function removeMember(id){ const r=residents.get(id); if(!r) return {ok:false}; if(r.childId){ try{ subagents.interrupt(r.childId,{kind:'ancestor',agent:rootAgent}) }catch(e){} } residents.delete(id); busy.delete(id); mailboxes.delete(id); await saveAll(); return {ok:true} }
678
683
  // Normalize one parameter value to its intended type so a string from /v4 set or configure