fix: 发布 1.1.67,#85/#84 + 启动种子 + 85 项清单一次性修复

- #85 continue 续跑加 failStreak 阈值;refundContinue 不清 lastContinueSeq,连错 3 次放弃
- #84 region gate denialStream 单批 text-chunks 带 .length,不再卡宿主 UI
- 启动即种子:$DSH_HOME/prompt-inject.md 为空/缺失自动写加密默认稿,用户改过的不动
- Windows 重启脚本:pid+random 命名 + 直接 wscript.exe //B,不再 /IM 杀全名
- 官方 CLI shim 原子写 + .dsh-purge.bak 可回退
- WScript clean 判定两 null 放行,首装不卡;探测缓存不缓存空结果
- scheduleAsarRenameWhenIdle 的 .rename-pending 锁时钟回拨/30min 失效自动清
- 三处 execFileSync 加 maxBuffer: 8MB,大结果不再 ENOBUFS 静默
- net-scope / identity / hooks-deny / extract-asar / client.js / core.js / update.js / skills.js / refusal-recover / rewind / rules / reapply 等共 85 项修复
This commit is contained in:
叫我小杨同学 committed 2026-10-09 11:52:39 +08:00
1 parent 3df4f489b1
commit d26e69a4fa
18 files changed
+1153 -403

No files matched your search

+20 -2
View File
@@ -3,8 +3,26 @@ import { randomUUID } from "node:crypto";
/** Region gate and other hard stops must not trigger auto-continue. */
const HARD_STOP = /不行[,,]\s*这是严令禁止的/u;
const REFUSAL =
/(?:^|[\s。!?!?\n])(?:抱歉|对不起|无法理解但|我理解但|出于(?:安全|合规)|无法(?:协助|帮助|提供|完成|直接)|不能(?:帮助|协助|提供|直接|进行|参与|为您|为你)?|(?:这个|这)?我(?:不能|无法|不会|不做|做不了|不参与)|不予(?:支持|提供)|未授权攻击|I\s*(?:can't|cannot|won't|will not)|unable\s+to\s+(?:assist|help|comply)|sorry[,.\s]|(?:decline|refuse)\s+to\s+(?:assist|help|comply)|(?:don'?t|do\s+not)\s+(?:do|perform|help\s+with)\s+this)/iu;
// M10: 抱歉 / 对不起 / 不好意思 / sorry 单独出现不算拒绝(e.g. "抱歉让你久等" / "sorry about that")。
// 要求它们在近邻窗口内(汉字 30 字 / 英文 80 字)跟一个拒绝动词,才判定为拒答。
// 其他独立的拒绝词条(无法协助、I can't、unable to assist 等)继续独立命中。
const REFUSAL = new RegExp(
"(?:^|[\\s。!?!?\\n])(?:" +
"(?:抱歉|对不起|不好意思)[^\\n]{0,30}?(?:我?(?:无法|不能|不会|不便|不方便|不予|做不了|不参与)|无法(?:协助|帮助|提供|完成)|不能(?:协助|帮助|提供|完成)|拒绝)|" +
"sorry[\\s,.][^\\n]{0,80}?(?:cannot|can'?t|won'?t|will\\s+not|unable\\s+to|not\\s+(?:able|allowed)|decline|refuse)|" +
"无法理解但|我理解但|出于(?:安全|合规)|" +
"无法(?:协助|帮助|提供|完成|直接)|" +
"不能(?:帮助|协助|提供|直接|进行|参与|为您|为你)|" +
"(?:这个|这)?我(?:不能|无法|不会|不做|做不了|不参与)|" +
"不予(?:支持|提供)|" +
"未授权攻击|" +
"I\\s*(?:can'?t|cannot|won'?t|will\\s+not)|" +
"unable\\s+to\\s+(?:assist|help|comply)|" +
"(?:decline|refuse)\\s+to\\s+(?:assist|help|comply)|" +
"(?:don'?t|do\\s+not)\\s+(?:do|perform|help\\s+with)\\s+this" +
")",
"iu"
);
export function lastAssistantText(events) {
const list = Array.isArray(events) ? events : [];