Vendored deer-flow upstream (bytedance/deer-flow) plus prompt-injection hardening: - New deerflow.security package: content_delimiter, html_cleaner, sanitizer (8 layers — invisible chars, control chars, symbols, NFC, PUA, tag chars, horizontal whitespace collapse with newline/tab preservation, length cap) - New deerflow.community.searx package: web_search, web_fetch, image_search backed by a private SearX instance, every external string sanitized and wrapped in <<<EXTERNAL_UNTRUSTED_CONTENT>>> delimiters - All native community web providers (ddg_search, tavily, exa, firecrawl, jina_ai, infoquest, image_search) replaced with hard-fail stubs that raise NativeWebToolDisabledError at import time, so a misconfigured tool.use path fails loud rather than silently falling back to unsanitized output - Native client back-doors (jina_client.py, infoquest_client.py) stubbed too - Native-tool tests quarantined under tests/_disabled_native/ (collect_ignore_glob via local conftest.py) - Sanitizer Layer 7 fix: only collapse horizontal whitespace, preserve newlines and tabs so list/table structure survives - Hardened runtime config.yaml references only the searx-backed tools - Factory overlay (backend/) kept in sync with deer-flow tree as a reference / source See HARDENING.md for the full audit trail and verification steps.
1.6 KiB
1.6 KiB
generate_district_map — 行政区地图(中国)
功能概述
生成中国境内省/市/区/县的覆盖或热力图,可展示指标区间、类别或区域组成,适用于区域销售、政策覆盖等场景。
输入字段
必填
title: string,必填且≤16 字,描述地图主题。data: object,必填,承载行政区配置及指标信息。data.name: string,必填,中国境内的行政区关键词,需明确到省/市/区/县。
可选
data.style.fillColor: string,自定义无数据区域的填充色。data.colors: string[],枚举或连续色带,默认提供 10 色列表。data.dataType: string,枚举number/enum,决定颜色映射方式。data.dataLabel: string,指标名称(如GDP)。data.dataValue: string,指标值或枚举标签。data.dataValueUnit: string,指标单位(如万亿)。data.showAllSubdistricts: boolean,默认false,是否展示全部下级行政区。data.subdistricts[]: array