Repository navigation
feat(websearch): add a keyless multi-engine search plugin - #203
Open
JochenYang wants to merge 1 commit into
Open
JochenYang wants to merge 1 commit into
JochenYang wants to merge 1 commit into
Conversation
Collaborator
|
✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plugin type (required) / 插件类型(必填)
Affected plugin name(s) / 涉及的插件名称:
websearchWhat / 改动内容
Problem / 问题. ZCode's built-in
WebSearchtool only exists when the model provider supports server-side native search (supportsNativeWebSearch), so under providers without it a session has no web search at all. / ZCode 内置的WebSearch走模型 provider 的服务端原生搜索,provider 不支持时整个会话就没有网页搜索可用。Change / 方案. Adds
external_plugins/websearch: a keyless multi-engine web search plugin shipped as a single zero-dependency MCP server (Node 18+ global fetch — nonode_modules, no build step, stdio transport).attemptswith quota hints. 新增external_plugins/websearch:多引擎自动回退的网页搜索。web_search(query / limit / engines) andfetch_page(static page text with SSRF guards).websearch.jsoninside the plugin data folder — auto-created on first start, its absolute path baked into the tool descriptions so users can just ask for it. 配置文件首启自动生成,路径写在工具描述里,问模型即可。assets/websearch/icon.png.Self-check / 自查清单
external_plugins/websearch// 插件名唯一且 kebab-case,新增插件位于external_plugins/websearch/categoryis set independently of publisher ownership /category: productivityversionbumped in BOTHplugin.jsonandmarketplace.json(artifacts are immutable) — both are0.1.5/ 两处版本号一致(0.1.5)README.md(EN) andREADME_CN.md(中文) both updated and equivalent / 中英文 README 均已提供且语义一致description_i18nhas bothenandzh-CN/description_i18n包含en与zh-CN(manifest 与市场条目完全一致)python3 scripts/validate.pypasses locally / 本地校验通过(60 plugins validated)python3 scripts/build_dist.py/git diff --check— see testing notes / 见下方测试说明Dependencies, network requests, permissions, side effects / 依赖、网络、权限与副作用
www.bing.com,cn.bing.com,api.anysearch.com,mcp.exa.ai,mcp.parallel.ai, plus user-configured SearXNG instances(用户自配的 SearXNG 实例).websearch.json); they are never shipped with the plugin. 可选 Key 存在用户本机的数据目录,不随插件分发。websearch.json(config template) inside$ZCODE_PLUGIN_DATA; nothing else. 仅自动生成一个配置模板文件。bin/server.mjsis the source of a zero-dependency server (Node 18+ global fetch), not a build artifact.Testing / 测试
node --check bin/server.mjs,node bin/server.mjs --self-test(offline parser / config / SSRF assertions) — OK.python tests/test-server.py: offline MCP handshake, tool list, error paths (15 checks) — OK.python tests/test-server.py --live: real engines — bing 3 results, default chain answered by anysearch, fetch_page read example.com, loopback refused withFETCH_BLOCKED— OK.web_search×2 →fetch_page×3). / 已在桌面端真实会话中使用。python3 scripts/build_dist.py:validate.pypasses for all 60 plugins;build_zipverified forwebsearchdirectly (27 KB deterministic zip). The fullbuild_distrun currently fails on the pre-existing unbuilt UI plugins (excalidrawrequirespnpm buildfirst) — unrelated to this PR; CI'sbuild-plugins.mjsstep covers that. / 全量 build_dist 在既有的未构建 UI 插件处失败,与本 PR 无关;websearch 单项打包已验证通过。