v0.16.10: 最小必要性清理 — 删除非必要校验和注入提示

按"让 AI 自己判断"原则,删除所有"工程师判断"性质的校验代码和注入提示,
只保留安全防护(路径沙箱/命令安全/参数消毒)和必要的上下文管理(压缩/截断)。

删除项:
- completion-gate.ts 整个文件(notThinking/toolResultReview/contextEfficiency/planModeCompletion)
- verifyToolResult 工具结果核验函数 + TOOLS_NEED_VERIFY 常量
- 跨轮次死循环检测器(recordLoopSignature/detectLoopDeadlock/resetLoopDeadlockDetector)
- R77 checkRateLimit 速率限制 + R87 isToolCircuitBroken 熔断器 + R104 isDuplicateToolResult 去重
- R56 目标对齐验证 + R63 速率限制 + R87 熔断器 + R104 去重检测 + R119 优先级排序
- agent-metrics recordCompletionGate + completionGatePassed + avgCompletionScore 相关代码
- context-manager 低价值关键词黑名单 + 快速摘要改用 user role
- LoopContext 的 completionGateFailCount/verifyWarnings 字段

修复项:
- R76 路径沙箱 replace bug:用 startsWith 前缀锚定替代 replace,避免子串误判
- R28 命令注入检测:缩小匹配范围,仅拦截命令替换中包含危险命令的情况

总计 13 文件变更,+46/-1124 行
This commit is contained in:
紫影233
2026-07-16 16:44:04 +08:00
parent a4b82b45bc
commit 80581deb37
13 changed files with 46 additions and 1124 deletions
+3 -3
View File
@@ -14,7 +14,7 @@
</p>
<p align="center">
<img src="https://img.shields.io/badge/version-v0.16.9-E8734A?style=flat-square" alt="version">
<img src="https://img.shields.io/badge/version-v0.16.10-E8734A?style=flat-square" alt="version">
<img src="https://img.shields.io/badge/electron-33+-47848F?style=flat-square&logo=electron" alt="electron">
<img src="https://img.shields.io/badge/typescript-5.7+-3178C6?style=flat-square&logo=typescript" alt="typescript">
<img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="license">
@@ -253,7 +253,7 @@ npm start
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ npm run dist
```
产出:`release/Metona Ollama Setup v0.16.9.exe`
产出:`release/Metona Ollama Setup v0.16.10.exe`
## 🛠️ 常用命令
@@ -501,7 +501,7 @@ npm start
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ npm run dist
```
Output: `release/Metona Ollama Setup v0.16.9.exe`
Output: `release/Metona Ollama Setup v0.16.10.exe`
## 🛠️ Common Commands