dsh-mcmp 2.1.2 → 2.1.3

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.
Files changed (2) hide show
  1. package/lib/index.js +10 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -517,6 +517,9 @@ export function apply(ctx) {
517
517
  state.phase = 'S8 兜底·论文定稿'
518
518
  state.agentLabel = 'S8 兜底·论文定稿'
519
519
  const fresh = makeController()
520
+ // 关键:把兜底定稿的控制器登记为当前活跃控制器,
521
+ // 否则面板「中止」与 /loopabort 只会 abort 已失效的主控制器,兜底定稿无法被中止
522
+ if (active && active.runId === runId) active.controller = fresh
520
523
  const reason = stopReason === 'cancelled' ? '用户中止' : stopReason === 'error' ? errorMsg : '正常流程已结束但定稿步骤未完成'
521
524
  const fres = await runChild(provider, session, agent, fresh, '兜底·论文定稿(不论成败)', buildFinalizePrompt(args, reason))
522
525
  if (fres.outcome === 'completed') {
@@ -524,7 +527,13 @@ export function apply(ctx) {
524
527
  pushLog('兜底定稿完成: 论文定稿.md 已生成')
525
528
  } else {
526
529
  pushLog('兜底定稿未能完成: ' + (fres.text || '').trim().slice(0, 80) + ' —— 请查看工作区已有成果')
527
- if (stopReason === 'completed') { stopReason = 'error'; errorMsg = '流水线迭代已完成,但兜底定稿生成失败' }
530
+ if (fres.outcome === 'cancelled') {
531
+ stopReason = 'cancelled'
532
+ errorMsg = '已被用户中止(兜底定稿未完成)'
533
+ } else if (stopReason === 'completed') {
534
+ stopReason = 'error'
535
+ errorMsg = '流水线迭代已完成,但兜底定稿生成失败'
536
+ }
528
537
  }
529
538
  }
530
539
  finishRun(runId, stopReason, errorMsg)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mcmp",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "description": "DeepSeek Harness 插件:数学建模论文自动化流水线 v2(8 步骤 × 19 迭代 × N 轮:图表视觉自检与修复、评审问题修复闭环、跨步骤缺陷台账与向上修复、论文兜底定稿、质疑驱动、断点续跑、进度面板)",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",