Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

Keep retrying plans of several sentences and targets that start with 过

Fei241162ac0e13b02d
diff --git a/docs/plans/2026-10-07-group-chat.md b/docs/plans/2026-10-07-group-chat.md
index b1c345de..a38991fd 100644
--- a/docs/plans/2026-10-07-group-chat.md
+++ b/docs/plans/2026-10-07-group-chat.md
@@ -27,7 +27,7 @@
- 一个成员同一时间只回答一个叫它的消息;前一个回答完(或转去后台干活)才开始下一个。
- 全员轮流的普通消息(不带 `@`)仍按顺序:上一个人发完(或跳过)下一个人才开始,每个人看到本轮之前所有人的发言和自己的位置。
- 回复里 `@` 了别人,被点的人接着说(接力)。有实质进展(调了工具、产出新内容)的接力不设次数上限;只有 Bot 之间连续 6 轮 0 工具调用且只是重复或客套确认时,才会暂停,群里提示「谁和谁来回 6 次没有进展,先停下了」;停下的叫人只在用户发言后继续,Bot 的帖或迟到的回复不会放行。要主动停下群里的工作,用户在群详情里点「全部停止」或逐个停。
-- 每个成员可以跳过(`[PASS]`),不必每轮都说话。被点名干活的成员如果只回复「收到 / 现在去查」却没调任何工具就结束回合,宿主会自动把这句作为进度发到群里并在同一调用上续推一次,让它真正调用工具把活做完(#469);如果那句其实已经是完整的回答,它回 `[PASS]`,群里不会出现两遍。只看整条话是不是只有承诺:后面跟着结论或列表的回复不续推。
+- 每个成员可以跳过(`[PASS]`),不必每轮都说话。被点名干活的成员如果只回复「收到 / 现在去查」却没调任何工具就结束回合,宿主会自动把这句作为进度发到群里并在同一调用上续推一次,让它真正调用工具把活做完(#469);如果那句其实已经是完整的回答,它回 `[PASS]`,群里不会出现两遍。说「检查过了」「处理好了」这类已经做完的话不续推。
### 提及
@@ -100,4 +100,4 @@
- 2026-10-30:同一条消息点到的成员同时开工,`@` 一发出来就生效,一轮中用户的话和 Bot 的帖马上交给该叫的人;只有全员轮流的普通消息还按顺序(#726)。
- 2026-10-31:派活按批次收回并等同一批全部落地后统一叫醒派活 Bot(#619);只回「收到/开工」未调工具的回合自动续推一次(#469);连续 6 轮 0 工具重复或客套空转自动暂停;运行中已吸收的群帖不再塞进群 Session 待发队列(#663);群成员派出的 DSH 子代理并入群忙碌状态与停止控制(#701)。
- 2026-11-01:群自己的 Session 也按段换,换群文件夹时换到群文件夹里的新一段;成员在群里换的文件夹只作用于这个群(#277)。
-- 2026-11-03:派活的 Bot 还在自己回合里时,批次落地后等它这回合结束再叫它;去掉按「需要拍板」字样叫管理员;续推可以回 `[PASS]`,后面带结论的回复不再续推;空转守卫停下的叫人只在用户发言后继续,提示说清是来回没有进展(#872)。
+- 2026-11-03:派活的 Bot 还在自己回合里时,批次落地后等它这回合结束再叫它;去掉按「需要拍板」字样叫管理员;续推可以回 `[PASS]`,说已经做完的话不再续推;空转守卫停下的叫人只在用户发言后继续,提示说清是来回没有进展(#872)。
diff --git a/ds-bot/src/host/turns.js b/ds-bot/src/host/turns.js
index fa286f0b..1339f3af 100644
--- a/ds-bot/src/host/turns.js
+++ b/ds-bot/src/host/turns.js
@@ -111,17 +111,12 @@ const RETRY_TEXT = 'Your last reply wrote a tool call as plain text (<tool_call>
const RETRY_PROMISE_TEXT = 'Your last reply said you would start working, but you ended the turn without calling any tool, so nothing ran. Call the tools you need and do the work now. If your last reply already was your whole answer, reply [PASS]; it stays posted.'
// A reply that only promises to start investigating/checking/running tools now without
-// actually calling a tool or handing off with @Name (#469). A verb followed by 过, 完
-// or 好了 reports work that is done.
-const PROMISED_WORK = /(?:^(?:收到|好的|明白|好|行|没问题|了解)[,,、。.!!:\s]*(?:我(?:现在|这就|先|马上|立刻|去|来)?(?:开始|着手|去|来|准备)?(?:排查|检查|调查|查看|看看|搜索|搜一下|分析|处理|执行|运行|跑一下|修改|修复|实现|编写|整理|验证|测试|读一下|翻一下)(?!过|完|好了)|(?:现在|马上|立刻)?(?:开始|着手)(?:执行|处理|排查|检查|调查|干活|开工)(?!过|完|好了)|开工(?:[。!!,,\s]|$))|^(?:开工(?:[。!!,,\s]|$)|我(?:现在|这就|先|马上|立刻)(?:开始|着手|去)(?:排查|检查|调查|查看|搜索|分析|处理|执行|运行|修改|修复|实现|编写|整理|验证|测试)(?!过|完|好了))|\b(?:(?:i\s+will|i'll|let\s+me|going\s+to)\s+(?:start|begin|check|look\s+into|investigate|search|run|inspect|read|fix|implement|work\s+on)\b|(?:starting|beginning)\s+(?:the\s+)?(?:investigation|check|search|work|execution|analysis)\b|^on\s+it[,.\s!]+(?:i'll|i\s+will|let\s+me|starting|checking)\b))/i
-// Only a promise that closes the reply counts: a second sentence or a list after it
-// ("好,我分析一下:…", "Let me check: …") is the answer itself.
-const PROMISE_ANSWERED = /[。!?;:\n]|[.!?;:](?=\s)/
-export const promisesWork = (text) => {
- const said = typeof text === 'string' ? text.trim() : ''
- const promise = said.length <= 240 ? PROMISED_WORK.exec(said) : null
- return promise !== null && !PROMISE_ANSWERED.test(said.slice(promise.index + promise[0].length).replace(/[\s。.!!~~]+$/u, ''))
-}
+// actually calling a tool or handing off with @Name (#469). A verb followed by 过了,
+// 完了, 完毕 or 好了 reports work that is done; 查看过去… still promises. A miss leaves
+// the work undone, while a wrong match only costs a turn the member can pass, so the
+// rest of the reply is not judged.
+const PROMISED_WORK = /(?:^(?:收到|好的|明白|好|行|没问题|了解)[,,、。.!!:\s]*(?:我(?:现在|这就|先|马上|立刻|去|来)?(?:开始|着手|去|来|准备)?(?:排查|检查|调查|查看|看看|搜索|搜一下|分析|处理|执行|运行|跑一下|修改|修复|实现|编写|整理|验证|测试|读一下|翻一下)(?!过了|过(?:[,,。.!!、;;\s]|$)|完了|完毕|好了)|(?:现在|马上|立刻)?(?:开始|着手)(?:执行|处理|排查|检查|调查|干活|开工)(?!过了|过(?:[,,。.!!、;;\s]|$)|完了|完毕|好了)|开工(?:[。!!,,\s]|$))|^(?:开工(?:[。!!,,\s]|$)|我(?:现在|这就|先|马上|立刻)(?:开始|着手|去)(?:排查|检查|调查|查看|搜索|分析|处理|执行|运行|修改|修复|实现|编写|整理|验证|测试)(?!过了|过(?:[,,。.!!、;;\s]|$)|完了|完毕|好了))|\b(?:(?:i\s+will|i'll|let\s+me|going\s+to)\s+(?:start|begin|check|look\s+into|investigate|search|run|inspect|read|fix|implement|work\s+on)\b|(?:starting|beginning)\s+(?:the\s+)?(?:investigation|check|search|work|execution|analysis)\b|^on\s+it[,.\s!]+(?:i'll|i\s+will|let\s+me|starting|checking)\b))/i
+export const promisesWork = text => typeof text === 'string' && text.trim().length <= 240 && PROMISED_WORK.test(text.trim())
export function install(rt) {
const { ctx, state } = rt
diff --git a/ds-bot/test/group-work.test.js b/ds-bot/test/group-work.test.js
index a8728897..dffa7082 100644
--- a/ds-bot/test/group-work.test.js
+++ b/ds-bot/test/group-work.test.js
@@ -1463,13 +1463,14 @@ test('a member that only promises to start working without calling a tool gets o
])
})
-// #872: a reply whose opening sounds like a promise but goes on with the answer is
-// the answer; a verb with 过/完/好了 reports done work.
-test('only a reply that is nothing but a promise counts as one (#872)', () => {
- for (const said of ['收到,我现在开始排查构建日志。', '明白,我先排查一下日志,然后跑测试。', '我现在开始排查', '开工!', "I'll check the logs now.", 'Let me look into it.']) {
+// #872: a verb with 过了/完了/完毕/好了 reports done work. A plan of several sentences,
+// or a target that starts with 过 or 完, is still a promise; a reply that also answers
+// may match, and its member passes on the retry.
+test('done work is no promise, and a plan of several sentences still is (#872)', () => {
+ for (const said of ['收到,我现在开始排查构建日志。', '明白,我先排查一下日志,然后跑测试。', '收到,我现在开始排查。稍后给你结果。', '收到,我先查看过去的记录。', '好的,我先检查完成情况。', '我现在开始排查', '开工!', "I'll check the logs. Then I'll run the tests.", 'Let me look into it.']) {
assert.equal(promisesWork(said), true, said)
}
- for (const said of ['好的,我检查过了,配置没问题。', '好,我分析一下:方案 A 更稳,B 改动太大,建议选 A。', '收到,我来整理结论:1. 接口没变 2. 测试要补。', '好的,我处理好了。', 'OK, let me check: the config already has retries=3, so nothing to change.', '查完了,原因是端口冲突。']) {
+ for (const said of ['好的,我检查过了,配置没问题。', '好的,我检查过,没问题。', '收到,我排查完了,是端口冲突。', '好的,我处理好了。', '查完了,原因是端口冲突。']) {
assert.equal(promisesWork(said), false, said)
}
})