Skip to content

feat(argo-zcode): add unified search, fetch, and evidence verification plugin - #120

Open
taxueseek wants to merge 3 commits into
zai-org:mainfrom
taxueseek:main
Open

taxueseek wants to merge 3 commits into
zai-org:mainfrom
taxueseek:main

Conversation

@taxueseek

@taxueseek taxueseek commented Oct 23, 2026 •

Copy link
Copy Markdown

Plugin type

UI Plugin — skills / commands / agents plus a ui.surfaces panel (MCP Apps page)

What it does

Argo 阿尔戈 — unified search, web fetching, and evidence verification over 284 sources (240 keyless), covering deep research, academic, social listening, WeChat articles, job aggregation, and local retrieval. Capability is provided by the open-source argo CLI (Apache-2.0); this plugin is its three-layer integration into ZCode:

Layer Form Notes
Model channel skills + commands + agents /argo for one-shot Q&A, /wide-research for multi-track orchestrated research with a source ledger and quality gate; the argo-researcher agent enforces worker tool allowlists mechanically via frontmatter
Control channel ui.surfaces panel Three sections — 看板 (key count, three workflow presets, route hint), 密钥 (one row per argo env key, grouped by owning engines, write-only), 诊断 (argo version and interpreter, config base plus local override, env file mode, daemon, budget, paths --check). Page-to-server traffic costs zero model tokens
CLI channel skill-guided CLI Model follows skill discipline to call argo search/fetch/research etc.; the panel MCP server declares six app-only tools, so none of them appears in the model's tool list

Panel screenshots from ZCode Desktop (captured on 2.10.1; this PR ships 2.10.2 with the same layout):

看板 / Dashboard 密钥 / Keys

Engine-level enable/disable is exposed as the panel tool set_engine, which writes argo's own local override layer (config.local.yaml, gitignored) through a Python bridge that reuses argo's config loader; keys go to argo's env file (chmod 600) and are never echoed back. The keys tab shows engine ownership and groups keys whose engines are all disabled under 已停用. An explicit engines page can be added if reviewers want the switch list in the UI.

Validation

  • python3 scripts/validate.py → OK: 52 plugin(s) validated
  • git diff --check → clean
  • argo-zcode artifact builds through scripts/build_dist.py's build_zip (14 files, vendor bundle included); a full local build_dist.py also needs pnpm build for the compiled UI plugins, which CI runs
  • Local stdio protocol: initialize / tools/list (6 app-only tools) / resources/list / resources/read (text/html;profile=mcp-app) / tools/call (get_panel returns the live engine and key inventory of this machine)
  • The panel HTML served from the built zip is byte-identical to the panel exercised in ZCode Desktop (the screenshots above)
  • Runtime acceptance steps are documented in the plugin README

相关依赖 / Dependencies

Users need the argo CLI installed (the skill provides install guidance); pyyaml comes with argo. Node.js is provided by the ZCode Desktop host.

…n plugin

Three-layer integration of argo CLI (272 sources, 235 keyless):
- Model channel: skills (argo / argo-wide-research) + commands (/argo, /wide-research) + argo-researcher agent with tool allowlist
- Control channel: ui.surfaces panel for engine toggles (272) and key management; panel MCP server keeps tools/list empty so model-facing token cost stays zero
- Config bridge: reuses argo's own config loader (config.local.yaml override layer + env file, chmod 600)
@panda920

Copy link
Copy Markdown
Collaborator

✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically.

@panda920

Copy link
Copy Markdown
Collaborator

✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically.

@jacksonliuyn

Copy link
Copy Markdown
Collaborator

Thanks for contributing Argo! Could you please add a screenshot or two of the UI panel to this PR? It would be helpful to see how the engine toggles and key settings look in ZCode. Thanks!

…e vendor server-side

- Panel rewritten as three sections: 看板 (key count, three workflow presets,
  route hint), 密钥 (one row per argo env key, grouped by owning engines, values
  never echoed, 已停用 group when every owning engine is off) and 诊断 (argv
  version/interpreter, config base + local override, env file mode, daemon,
  budget, paths --check output).
- panel_server inlines ui/vendor/ext-apps.mjs into the panel at resources/read
  time. The host returns resource text only, so a relative import never
  resolves; the source stays diffable and no build step is needed. Verified the
  served HTML is byte-identical to the artifact used for the screenshots.
- py_bridge gains panel-data and diagnostics: engine state and key ownership are
  derived from argo's own loader instead of a second config parser.
- tools/list no longer returns an empty array (the App bridge rejects
  callServerTool for unknown tools); the six panel tools are declared app-only
  so they never enter the model's tool list.
- README documents the three sections with screenshots; version 2.10.2.
@taxueseek

Copy link
Copy Markdown
Author

@jacksonliuyn thanks for reviewing — screenshots added below, and I pushed the current panel code along with them. Your review landed on the original single-page panel, which no longer matches what the plugin ships.

看板 / Dashboard — key count, three workflow presets (fast / balanced / deep; they write argo's runtime switches), route hint

密钥 / Keys — one row per argo env key, grouped by the engines that own it, write-only (the value is never echoed back); save and clear edit argo's env file in place

One correction to the description, fixed in the body as well: the panel is now three sections (看板 / 密钥 / 诊断) rather than a single page with a toggle per engine. Per-engine on/off still exists as the panel's set_engine tool — app-only, writes config.local.yaml, never exposed to the model — and a key whose engines are all disabled drops into a 已停用 group, but the 284-row switch list is no longer rendered. If you would rather see an explicit engines page in the UI, that is a small addition — say the word.

Also in this push (2.10.1 → 2.10.2):

  • The App SDK vendor bundle is inlined at resources/read time. The host serves resource text only, so a relative import inside the page does not resolve; the panel source stays readable and there is no build step.
  • tools/list now returns the six app-only panel tools instead of an empty array — the App bridge rejects callServerTool for tools it cannot find, and app-only keeps them out of the model's context.
  • py_bridge derives engine state and key ownership from argo's own config loader instead of a second parser.

Screenshots were captured on 2.10.1; the only visible difference in 2.10.2 is the version label. Both images also live in docs/images/ui-plugins/ and are referenced from the plugin README.

@panda920

Copy link
Copy Markdown
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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants