feat(io): web-fetch 直连→浏览器渲染降级档 + fetchedBy 如实标注(Z5 机制)
- 降级链:直连失败 / 判定为动态页 ⇒ 浏览器渲染取正文;返回体带 fetchedBy=direct|browser,
两条档的失败各自留痕(directError/browserError/browserSource/dynamicSuspect),**绝不静默替换**
- 被 SSRF 拒绝的目标**不换路**(红线);渲染器缺位时如实报双失败
- 3 个变异自检(去掉动态页判据 / 去掉 SSRF 短路 / 掩盖双失败)
⚠️ **生产接不通**:internal/capability/browser 没有「取正文」入口(不在本片文件面)⇒
开关默认关、不假装可用;解封形状已在报告里给出(加 RenderText ≈40 行)
This commit is contained in:
1 parent
20f82c9679
commit
c2e413ec38
6 files changed
+687
-41
No files matched your search
@@ -33,7 +33,12 @@
|
||||
// configuration (the model only supplies the query), hence their hosts are trusted
|
||||
// by this tool alone: a loopback fallback endpoint stays reachable without widening
|
||||
// the shared http/web-fetch allowlist. API keys never reach logs, results or prompts.
|
||||
// - web-fetch: size- and content-type-limited readable text extraction.
|
||||
// - web-fetch: size- and content-type-limited readable text extraction. 取正文走
|
||||
// **降级链**(design/28 §1 M5 / §8 B5):直连 fetch →(失败 / 判定为动态页)
|
||||
// ⇒ 浏览器渲染取正文,返回体用 `fetchedBy`(direct / browser)**如实标注实际
|
||||
// 走了哪条**,两条档的失败原文分别留在 directError / browserError 里 —— 绝不静默
|
||||
// 替换、绝不把失败说成成功。这一档**默认关**(WithBrowserFallback);被 SSRF
|
||||
// 判定拒绝的目标**不换路**(换条路访问同一目标是绕过判定,不是降级)。
|
||||
// - knowledge: RAG lookup over the runtime memory retriever; a clear message
|
||||
// when no knowledge base is configured.
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user