@zenalexa/unicli 0.215.0 → 0.215.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.zh-CN.md CHANGED
@@ -6,18 +6,30 @@
6
6
 
7
7
  # Uni-CLI
8
8
 
9
- > 给你的 Agent 一双手。
9
+ > 一个 CLI,让 Agent 真正会用网站、应用和电脑。
10
10
 
11
- <!-- STATS:site_count -->220<!-- /STATS --> 个站点 &nbsp;·&nbsp; <!-- STATS:command_count -->1283<!-- /STATS --> 条命令 &nbsp;·&nbsp; 自修复 YAML &nbsp;·&nbsp; 比 MCP 少 95–99% token
11
+ Uni-CLI 把一句话变成一条能跑的命令。Agent 先搜命令,再执行,拿 Markdown/JSON 结果;网站坏了,还能按错误信息自己修 YAML
12
12
 
13
13
  <br>
14
14
 
15
- <a href="https://www.npmjs.com/package/@zenalexa/unicli"><img src="https://img.shields.io/npm/v/@zenalexa/unicli?style=flat-square&color=cb3837" alt="npm"></a>
16
- <a href="https://github.com/olo-dot-io/Uni-CLI/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/olo-dot-io/Uni-CLI/ci.yml?style=flat-square&label=CI" alt="CI"></a>
17
- <a href="https://github.com/olo-dot-io/Uni-CLI/stargazers"><img src="https://img.shields.io/github/stars/olo-dot-io/Uni-CLI?style=flat-square" alt="stars"></a>
18
- <a href="./LICENSE"><img src="https://img.shields.io/github/license/olo-dot-io/Uni-CLI?style=flat-square" alt="license"></a>
19
- <img src="https://img.shields.io/badge/tests-<!-- STATS:test_count -->7145<!-- /STATS -->-44cc11?style=flat-square" alt="tests">
20
- <img src="https://img.shields.io/badge/agent--reach-ally-6a5acd?style=flat-square" alt="agent-reach ally">
15
+ <img src="https://readme-typing-svg.demolab.com?font=JetBrains+Mono&duration=2200&pause=700&color=6A5ACD&center=true&vCenter=true&width=720&lines=Find+the+right+command;Run+real+sites+and+apps;Get+JSON+or+Markdown+back;Fix+adapters+without+waiting" alt="Find the right command. Run real sites and apps. Get JSON or Markdown back. Fix adapters without waiting.">
16
+
17
+ <br>
18
+
19
+ <a href="https://www.npmjs.com/package/@zenalexa/unicli"><img src="https://img.shields.io/npm/v/@zenalexa/unicli?style=for-the-badge&color=cb3837&label=npm" alt="npm"></a>
20
+ <a href="https://github.com/olo-dot-io/Uni-CLI/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/olo-dot-io/Uni-CLI/ci.yml?style=for-the-badge&label=CI" alt="CI"></a>
21
+ <a href="https://github.com/olo-dot-io/Uni-CLI/stargazers"><img src="https://img.shields.io/github/stars/olo-dot-io/Uni-CLI?style=for-the-badge" alt="stars"></a>
22
+ <a href="./LICENSE"><img src="https://img.shields.io/github/license/olo-dot-io/Uni-CLI?style=for-the-badge" alt="license"></a>
23
+ <img src="https://img.shields.io/badge/tests-<!-- STATS:test_count -->7160<!-- /STATS -->-44cc11?style=for-the-badge" alt="tests">
24
+ <img src="https://img.shields.io/badge/agent--reach-ally-6a5acd?style=for-the-badge" alt="agent-reach ally">
25
+
26
+ <br>
27
+
28
+ <img src="https://img.shields.io/badge/<!-- STATS:site_count -->220<!-- /STATS -->_sites-111827?style=for-the-badge" alt="220 sites">
29
+ <img src="https://img.shields.io/badge/<!-- STATS:command_count -->1283<!-- /STATS -->_commands-0f766e?style=for-the-badge" alt="1283 commands">
30
+ <img src="https://img.shields.io/badge/58_CLI_bridges-7c3aed?style=for-the-badge" alt="58 CLI bridges">
31
+ <img src="https://img.shields.io/badge/v2_AgentEnvelope-2563eb?style=for-the-badge" alt="v2 AgentEnvelope">
32
+ <img src="https://img.shields.io/badge/self--repairing_YAML-f97316?style=for-the-badge" alt="self-repairing YAML">
21
33
 
22
34
  <br>
23
35
 
@@ -25,9 +37,109 @@
25
37
 
26
38
  <br>
27
39
 
28
- ```sh
29
- npm install -g @zenalexa/unicli
30
- ```
40
+ <pre><code>npm install -g @zenalexa/unicli
41
+ unicli search "你的意图"
42
+ unicli &lt;站点&gt; &lt;命令&gt; -f json</code></pre>
43
+
44
+ <br>
45
+
46
+ <p align="center">
47
+ <strong>Web / 社交 / 知识</strong><br>
48
+ <img src="https://img.shields.io/badge/微博-E6162D?style=flat-square&logo=sinaweibo&logoColor=white" alt="微博">
49
+ <img src="https://img.shields.io/badge/知乎-0084FF?style=flat-square&logo=zhihu&logoColor=white" alt="知乎">
50
+ <img src="https://img.shields.io/badge/Bilibili-00A1D6?style=flat-square&logo=bilibili&logoColor=white" alt="哔哩哔哩">
51
+ <img src="https://img.shields.io/badge/小红书-FF2442?style=flat-square&logoColor=white" alt="小红书">
52
+ <img src="https://img.shields.io/badge/抖音-000000?style=flat-square&logo=tiktok&logoColor=white" alt="抖音">
53
+ <img src="https://img.shields.io/badge/Twitter%2FX-000000?style=flat-square&logo=x&logoColor=white" alt="Twitter/X">
54
+ <img src="https://img.shields.io/badge/Reddit-FF4500?style=flat-square&logo=reddit&logoColor=white" alt="Reddit">
55
+ <img src="https://img.shields.io/badge/Instagram-E4405F?style=flat-square&logo=instagram&logoColor=white" alt="Instagram">
56
+ <img src="https://img.shields.io/badge/TikTok-000000?style=flat-square&logo=tiktok&logoColor=white" alt="TikTok">
57
+ <img src="https://img.shields.io/badge/YouTube-FF0000?style=flat-square&logo=youtube&logoColor=white" alt="YouTube">
58
+ <img src="https://img.shields.io/badge/HackerNews-FF6600?style=flat-square&logo=ycombinator&logoColor=white" alt="HackerNews">
59
+ <img src="https://img.shields.io/badge/StackOverflow-F58025?style=flat-square&logo=stackoverflow&logoColor=white" alt="StackOverflow">
60
+ <img src="https://img.shields.io/badge/ProductHunt-DA552F?style=flat-square&logo=producthunt&logoColor=white" alt="ProductHunt">
61
+ <img src="https://img.shields.io/badge/GitHub-181717?style=flat-square&logo=github&logoColor=white" alt="GitHub">
62
+ <img src="https://img.shields.io/badge/npm-CB3837?style=flat-square&logo=npm&logoColor=white" alt="npm">
63
+ <img src="https://img.shields.io/badge/PyPI-3775A9?style=flat-square&logo=pypi&logoColor=white" alt="PyPI">
64
+ <img src="https://img.shields.io/badge/Wikipedia-000000?style=flat-square&logo=wikipedia&logoColor=white" alt="Wikipedia">
65
+ <img src="https://img.shields.io/badge/Spotify-1DB954?style=flat-square&logo=spotify&logoColor=white" alt="Spotify">
66
+ <img src="https://img.shields.io/badge/IMDb-F5C518?style=flat-square&logo=imdb&logoColor=black" alt="IMDb">
67
+ <img src="https://img.shields.io/badge/Bloomberg-000000?style=flat-square&logoColor=white" alt="Bloomberg">
68
+ <img src="https://img.shields.io/badge/Reuters-FF8000?style=flat-square&logo=reuters&logoColor=white" alt="Reuters">
69
+ <img src="https://img.shields.io/badge/BBC-B80000?style=flat-square&logo=bbc&logoColor=white" alt="BBC">
70
+ <img src="https://img.shields.io/badge/Binance-F0B90B?style=flat-square&logo=binance&logoColor=black" alt="Binance">
71
+ <img src="https://img.shields.io/badge/Coinbase-0052FF?style=flat-square&logo=coinbase&logoColor=white" alt="Coinbase">
72
+ <img src="https://img.shields.io/badge/Yahoo%20Finance-6001D2?style=flat-square&logo=yahoo&logoColor=white" alt="Yahoo Finance">
73
+ <img src="https://img.shields.io/badge/HuggingFace-FFD21F?style=flat-square&logo=huggingface&logoColor=black" alt="HuggingFace">
74
+ </p>
75
+
76
+ <p align="center">
77
+ <strong>Agent / IDE / Coding Surfaces</strong><br>
78
+ <img src="https://img.shields.io/badge/Claude%20Code-D97757?style=flat-square&logo=anthropic&logoColor=white" alt="Claude Code">
79
+ <img src="https://img.shields.io/badge/Codex-111111?style=flat-square&logo=openai&logoColor=white" alt="Codex">
80
+ <img src="https://img.shields.io/badge/OpenCode-101010?style=flat-square&logoColor=white" alt="OpenCode">
81
+ <img src="https://img.shields.io/badge/Cursor-000000?style=flat-square&logoColor=white" alt="Cursor">
82
+ <img src="https://img.shields.io/badge/Kiro-FF9900?style=flat-square&logo=amazon&logoColor=black" alt="Kiro">
83
+ <img src="https://img.shields.io/badge/Gemini-4285F4?style=flat-square&logo=googlegemini&logoColor=white" alt="Gemini">
84
+ <img src="https://img.shields.io/badge/Qwen-1E88E5?style=flat-square&logoColor=white" alt="Qwen">
85
+ <img src="https://img.shields.io/badge/Kimi-6C5CE7?style=flat-square&logoColor=white" alt="Kimi">
86
+ <img src="https://img.shields.io/badge/MiniMax-00A6FB?style=flat-square&logoColor=white" alt="MiniMax">
87
+ <img src="https://img.shields.io/badge/Cline-6E56CF?style=flat-square&logoColor=white" alt="Cline">
88
+ <img src="https://img.shields.io/badge/Roo%20Code-2E7D32?style=flat-square&logoColor=white" alt="Roo Code">
89
+ <img src="https://img.shields.io/badge/Windsurf-00C2FF?style=flat-square&logoColor=white" alt="Windsurf">
90
+ <img src="https://img.shields.io/badge/Continue-000000?style=flat-square&logoColor=white" alt="Continue">
91
+ <img src="https://img.shields.io/badge/Aider-6F42C1?style=flat-square&logo=python&logoColor=white" alt="Aider">
92
+ <img src="https://img.shields.io/badge/Goose-111827?style=flat-square&logoColor=white" alt="Goose">
93
+ <img src="https://img.shields.io/badge/OpenHands-FF6B00?style=flat-square&logoColor=white" alt="OpenHands">
94
+ <img src="https://img.shields.io/badge/SWE--agent-0F172A?style=flat-square&logoColor=white" alt="SWE-agent">
95
+ <img src="https://img.shields.io/badge/GitHub%20Copilot-181717?style=flat-square&logo=githubcopilot&logoColor=white" alt="GitHub Copilot">
96
+ <img src="https://img.shields.io/badge/Amp-5B5BD6?style=flat-square&logoColor=white" alt="Amp">
97
+ <img src="https://img.shields.io/badge/Auggie-0EA5E9?style=flat-square&logoColor=white" alt="Auggie">
98
+ <img src="https://img.shields.io/badge/Crush-E11D48?style=flat-square&logoColor=white" alt="Crush">
99
+ <img src="https://img.shields.io/badge/AgentAPI-334155?style=flat-square&logoColor=white" alt="AgentAPI">
100
+ <img src="https://img.shields.io/badge/acpx-475569?style=flat-square&logoColor=white" alt="acpx">
101
+ </p>
102
+
103
+ <p align="center">
104
+ <strong>Desktop / Media / DevOps / Cloud</strong><br>
105
+ <img src="https://img.shields.io/badge/macOS-000000?style=flat-square&logo=apple&logoColor=white" alt="macOS">
106
+ <img src="https://img.shields.io/badge/Chrome-4285F4?style=flat-square&logo=googlechrome&logoColor=white" alt="Chrome">
107
+ <img src="https://img.shields.io/badge/Blender-F5792A?style=flat-square&logo=blender&logoColor=white" alt="Blender">
108
+ <img src="https://img.shields.io/badge/ffmpeg-007808?style=flat-square&logo=ffmpeg&logoColor=white" alt="ffmpeg">
109
+ <img src="https://img.shields.io/badge/ImageMagick-0074C1?style=flat-square&logoColor=white" alt="ImageMagick">
110
+ <img src="https://img.shields.io/badge/GIMP-5C5543?style=flat-square&logo=gimp&logoColor=white" alt="GIMP">
111
+ <img src="https://img.shields.io/badge/FreeCAD-729FCF?style=flat-square&logo=freecad&logoColor=white" alt="FreeCAD">
112
+ <img src="https://img.shields.io/badge/Audacity-0000CC?style=flat-square&logo=audacity&logoColor=white" alt="Audacity">
113
+ <img src="https://img.shields.io/badge/Docker-2496ED?style=flat-square&logo=docker&logoColor=white" alt="Docker">
114
+ <img src="https://img.shields.io/badge/GitHub%20CLI-181717?style=flat-square&logo=github&logoColor=white" alt="GitHub CLI">
115
+ <img src="https://img.shields.io/badge/jq-C7254E?style=flat-square&logo=json&logoColor=white" alt="jq">
116
+ <img src="https://img.shields.io/badge/yt--dlp-4A5568?style=flat-square&logo=youtube&logoColor=white" alt="yt-dlp">
117
+ <img src="https://img.shields.io/badge/AWS-232F3E?style=flat-square&logo=amazonaws&logoColor=white" alt="AWS">
118
+ <img src="https://img.shields.io/badge/Vercel-000000?style=flat-square&logo=vercel&logoColor=white" alt="Vercel">
119
+ <img src="https://img.shields.io/badge/Supabase-3ECF8E?style=flat-square&logo=supabase&logoColor=black" alt="Supabase">
120
+ <img src="https://img.shields.io/badge/Cloudflare-F38020?style=flat-square&logo=cloudflare&logoColor=white" alt="Cloudflare">
121
+ <img src="https://img.shields.io/badge/Stripe-635BFF?style=flat-square&logo=stripe&logoColor=white" alt="Stripe">
122
+ <img src="https://img.shields.io/badge/Firebase-FFCA28?style=flat-square&logo=firebase&logoColor=black" alt="Firebase">
123
+ <img src="https://img.shields.io/badge/Netlify-00C7B7?style=flat-square&logo=netlify&logoColor=white" alt="Netlify">
124
+ <img src="https://img.shields.io/badge/Railway-0B0D0E?style=flat-square&logo=railway&logoColor=white" alt="Railway">
125
+ <img src="https://img.shields.io/badge/Azure-0078D4?style=flat-square&logo=microsoftazure&logoColor=white" alt="Azure">
126
+ <img src="https://img.shields.io/badge/Google%20Cloud-4285F4?style=flat-square&logo=googlecloud&logoColor=white" alt="Google Cloud">
127
+ <img src="https://img.shields.io/badge/Twilio-F22F46?style=flat-square&logo=twilio&logoColor=white" alt="Twilio">
128
+ <img src="https://img.shields.io/badge/Resend-000000?style=flat-square&logo=resend&logoColor=white" alt="Resend">
129
+ <img src="https://img.shields.io/badge/Algolia-003DFF?style=flat-square&logo=algolia&logoColor=white" alt="Algolia">
130
+ <img src="https://img.shields.io/badge/Slack-4A154B?style=flat-square&logo=slack&logoColor=white" alt="Slack">
131
+ <img src="https://img.shields.io/badge/Notion-000000?style=flat-square&logo=notion&logoColor=white" alt="Notion">
132
+ <img src="https://img.shields.io/badge/Linear-5E6AD2?style=flat-square&logo=linear&logoColor=white" alt="Linear">
133
+ <img src="https://img.shields.io/badge/Figma-F24E1E?style=flat-square&logo=figma&logoColor=white" alt="Figma">
134
+ </p>
135
+
136
+ <table>
137
+ <tr>
138
+ <td><strong>给人用</strong><br>装一个二进制,就能从终端调用网站、桌面应用、外部 CLI 和系统动作。</td>
139
+ <td><strong>给 Agent 用</strong><br>先搜任务,再跑一条命令,解析一个 envelope;网站变了就按错误信息修 YAML。</td>
140
+ <td><strong>给维护者用</strong><br>适配器保持小、可读、可测试,用户修复落在 <code>~/.unicli/adapters/</code>。</td>
141
+ </tr>
142
+ </table>
31
143
 
32
144
  <br>
33
145
 
@@ -57,21 +169,24 @@ Agent 自己会搞定。回来的时候,220 个站点都在 CLI 里等着你
57
169
  | **Claude Code** | `claude mcp add unicli -- npx @zenalexa/unicli mcp serve` |
58
170
  | **Codex CLI** | 在 `~/.codex/config.toml` 添加 `[mcp_servers.unicli]` · `command = "npx @zenalexa/unicli mcp serve"` |
59
171
  | **Cursor / Windsurf** | MCP 设置 → 添加服务器 → `npx @zenalexa/unicli mcp serve` |
60
- | **avante.nvim / Zed** | `unicli acp` — JSON-RPC 2.0(ACP 协议) |
172
+ | **avante.nvim / Zed** | `unicli acp` — ACP 兼容入口;核心执行优先走 CLI/JSON/MCP |
61
173
  | **OpenCode** | 在 `opencode.jsonc` 中添加 `"command": "unicli mcp serve"` |
174
+ | **Kiro / Cline / Roo** | 作为 MCP server 接入 Uni-CLI;编辑器继续拥有 session |
62
175
  | **任何有 Bash 权限的 Agent** | 直接运行 `unicli <站点> <命令>` — 零配置 |
63
176
 
64
177
  ---
65
178
 
66
179
  ## 是什么
67
180
 
68
- Uni-CLI 是专为 AI Agent 设计的通用命令行界面——单个二进制文件,将 Agent 意图编译为可确定性执行的程序,覆盖 <!-- STATS:site_count -->220<!-- /STATS --> 个站点、30+ 桌面应用、35 个 CLI 桥接和本地操作系统(共 <!-- STATS:command_count -->1283<!-- /STATS --> 条命令)。每个适配器约 20 行 YAML:Agent 可读、可编辑、零构建步骤。站点修改 API 时,Agent 编辑 YAML,保存到 `~/.unicli/adapters/`,重试即可。修复永久生效,`npm update` 也不会覆盖。全程无需人工介入。
181
+ Uni-CLI 是专为 AI Agent 设计的通用命令行界面——单个二进制文件,将 Agent 意图编译为可确定性执行的程序,覆盖 <!-- STATS:site_count -->220<!-- /STATS --> 个站点、30+ 桌面应用、58 个 CLI 桥接和本地操作系统(共 <!-- STATS:command_count -->1283<!-- /STATS --> 条命令)。每个适配器约 20 行 YAML:Agent 可读、可编辑、零构建步骤。站点修改 API 时,Agent 编辑 YAML,保存到 `~/.unicli/adapters/`,重试即可。修复永久生效,`npm update` 也不会覆盖。全程无需人工介入。
69
182
 
70
183
  覆盖范围贯穿各个层面:HTTP Web API、CDP 浏览器自动化、桌面子进程(ffmpeg、Blender、LibreOffice)、macOS 系统调用(截屏、日历、剪贴板)、macOS AX,以及可插拔 CUA 合同。Windows UIA、Linux AT-SPI 和第三方 CUA provider 当前是显式声明的能力边界/接口桩,不按已完成实执行能力宣传;全部通过统一的 `unicli <站点> <命令>` 接口访问。
71
184
 
72
185
  ## 为什么 CLI 比 MCP 强
73
186
 
74
- 一个 93 工具的 MCP 服务器在 Agent 能行动之前要加载约 55,000 个 tokenFirecrawl、Scalekit、Apideck 的独立基准测试均报告,Agent 通过 CLI 层按需拉取命令比加载完整 MCP 目录减少 95–99% 的上下文开销。2025–2026 年的学术研究(Semantic Tool Discovery、ITR Dynamic Tool Exposure、JSPLIT)得出了相同结论。
187
+ 大型工具目录会让 Agent 在行动之前先付上下文成本:描述、schema、示例、认证说明和边界条件都会挤占任务上下文。Uni-CLI 默认不把完整目录塞进上下文;Agent 先按意图搜索,拿到一条可执行命令,再收到一个足够小、足够结构化、可重试也可修复的 v2 envelope
188
+
189
+ 当前 Agent 栈没有收敛到单一 runtime。真实可复用的形态是 native CLI、JSON stream、MCP 工具总线、编辑器持有 session、桥接控制面和 watchlist runtime 混合存在。Uni-CLI 不硬编码赢家,而是把它们都当作路由:优先 CLI/JSON/MCP,编辑器 gateway 只放在真正需要兼容的边界。
75
190
 
76
191
  | 接口 | 冷启动开销 | 单次命令成本 | 自修复 |
77
192
  | ----------------------------- | -------------- | ------------------------------------------- | ------ |
@@ -79,7 +194,7 @@ Uni-CLI 是专为 AI Agent 设计的通用命令行界面——单个二进制
79
194
  | **Uni-CLI MCP**(4 个元工具) | **~200 token** | 见 [`docs/BENCHMARK.md`](docs/BENCHMARK.md) | **是** |
80
195
  | **Uni-CLI via Bash** | **0 token** | 见 [`docs/BENCHMARK.md`](docs/BENCHMARK.md) | **是** |
81
196
 
82
- Uni-CLI 的 MCP 服务器只暴露四个元工具(`unicli_run`、`unicli_list`、`unicli_search`、`unicli_explore`),Agent 通过 BM25 中英双语搜索在 50KB 索引中按需拉取精确命令。诚实的单次调用数据(p50/p95,实测非估算):[`docs/BENCHMARK.md`](docs/BENCHMARK.md)。
197
+ Uni-CLI 的 MCP 服务器只暴露四个元工具(`unicli_run`、`unicli_list`、`unicli_search`、`unicli_explore`),Agent 通过 BM25 中英双语搜索在 50KB 索引中按需拉取精确命令。直接 Bash 调用没有工具目录 token,只是一次确定性的子进程执行。可复现的本地数据(p50/p95,token + latency):[`docs/BENCHMARK.md`](docs/BENCHMARK.md)。
83
198
 
84
199
  ## 快速开始
85
200
 
@@ -150,17 +265,18 @@ unicli repair --loop # 自主修复循环(Agent 驱动)
150
265
 
151
266
  ## 功能矩阵
152
267
 
153
- | 能力 | 详情 |
154
- | ------------------ | -------------------------------------------------------------------------------------- |
155
- | **CUA 合同** | 稳定 screenshot/action 接口、mock 后端和显式 provider 桩;尚不按真实 computer-use 宣传 |
156
- | **MCP 传输** | stdio · Streamable HTTP(规范 2025-11-25)· SSE · OAuth 2.1 PKCE |
157
- | **ACP** | `unicli acp` JSON-RPC 2.0,支持 avante.nvimZed、Gemini CLI |
158
- | **跨厂商 Skills** | Claude Code · OpenCode · Codex CLI · Cursor · Windsurf · Cline |
159
- | **自修复** | 每条 stderr 错误携带 `adapter_path` + `step` + `suggestion`(Banach 收敛) |
160
- | **中英双语搜索** | BM25 + TF-IDF · 50KB 索引 · <10ms · 200 条 ZH↔EN 别名表 |
161
- | **浏览器守护进程** | 持久化 Chrome(CDP)· 复用登录状态 · 13 层反检测隐身 |
162
- | **输出格式** | 终端表格 · JSON(管道自动切换)· YAML · CSV · Markdown |
163
- | **认证策略** | public · cookie · CSRF header · browser intercept · UI 自动化 — 自动级联探测 |
268
+ | 能力 | 详情 |
269
+ | ------------------ | --------------------------------------------------------------------------------------------- |
270
+ | **CUA 合同** | 稳定 screenshot/action 接口、mock 后端和显式 provider 桩;尚不按真实 computer-use 宣传 |
271
+ | **MCP 传输** | stdio · Streamable HTTP(规范 2025-11-25)· SSE · OAuth 2.1 PKCE |
272
+ | **Agent 后端矩阵** | `unicli agents matrix/recommend`:覆盖 native CLI、JSON streamMCP、桥接、编辑器和 watchlist |
273
+ | **ACP Gateway** | `unicli acp` 保留 avante.nvim/Zed 兼容入口,不作为核心 runtime |
274
+ | **跨厂商 Skills** | Claude Code · OpenCode · Codex CLI · Cursor · Windsurf · Cline |
275
+ | **自修复** | 每条 stderr 错误携带 `adapter_path` + `step` + `suggestion`(Banach 收敛) |
276
+ | **中英双语搜索** | BM25 + TF-IDF · 50KB 索引 · <10ms · 200 条 ZH↔EN 别名表 |
277
+ | **浏览器守护进程** | 持久化 Chrome(CDP)· 复用登录状态 · 13 层反检测隐身 |
278
+ | **输出格式** | 终端表格 · JSON(管道自动切换)· YAML · CSV · Markdown |
279
+ | **认证策略** | public · cookie · CSRF header · browser intercept · UI 自动化 — 自动级联探测 |
164
280
 
165
281
  ## 平台覆盖
166
282
 
@@ -175,25 +291,7 @@ unicli repair --loop # 自主修复循环(Agent 驱动)
175
291
  | **AI / ML (14)** | HuggingFace · 魔搭 · Ollama · Replicate · DeepSeek · 豆包 |
176
292
  | **桌面软件 (30+)** | Blender · ffmpeg · ImageMagick · GIMP · FreeCAD · LibreOffice |
177
293
  | **macOS 系统 (58)** | 截屏 · 剪贴板 · 日历 · 邮件 · 提醒事项 · 快捷指令 · Safari |
178
- | **CLI 桥接 (35)** | gh · yt-dlp · jq · aws · vercel · supabase · wrangler · stripe |
179
-
180
- <p align="center">
181
- <img src="https://img.shields.io/badge/微博-E6162D?style=flat-square&logo=sinaweibo&logoColor=white" alt="微博">
182
- <img src="https://img.shields.io/badge/知乎-0084FF?style=flat-square&logo=zhihu&logoColor=white" alt="知乎">
183
- <img src="https://img.shields.io/badge/Bilibili-00A1D6?style=flat-square&logo=bilibili&logoColor=white" alt="哔哩哔哩">
184
- <img src="https://img.shields.io/badge/Twitter%2FX-000000?style=flat-square&logo=x&logoColor=white" alt="Twitter/X">
185
- <img src="https://img.shields.io/badge/Reddit-FF4500?style=flat-square&logo=reddit&logoColor=white" alt="Reddit">
186
- <img src="https://img.shields.io/badge/HackerNews-FF6600?style=flat-square&logo=ycombinator&logoColor=white" alt="HackerNews">
187
- <img src="https://img.shields.io/badge/GitHub-181717?style=flat-square&logo=github&logoColor=white" alt="GitHub">
188
- <img src="https://img.shields.io/badge/npm-CB3837?style=flat-square&logo=npm&logoColor=white" alt="npm">
189
- <img src="https://img.shields.io/badge/Binance-F0B90B?style=flat-square&logo=binance&logoColor=black" alt="Binance">
190
- <img src="https://img.shields.io/badge/HuggingFace-FFD21F?style=flat-square&logo=huggingface&logoColor=black" alt="HuggingFace">
191
- <img src="https://img.shields.io/badge/Blender-F5792A?style=flat-square&logo=blender&logoColor=white" alt="Blender">
192
- <img src="https://img.shields.io/badge/ffmpeg-007808?style=flat-square&logo=ffmpeg&logoColor=white" alt="ffmpeg">
193
- <img src="https://img.shields.io/badge/AWS-232F3E?style=flat-square&logo=amazonaws&logoColor=white" alt="AWS">
194
- <img src="https://img.shields.io/badge/Vercel-000000?style=flat-square&logo=vercel&logoColor=white" alt="Vercel">
195
- <img src="https://img.shields.io/badge/Stripe-635BFF?style=flat-square&logo=stripe&logoColor=white" alt="Stripe">
196
- </p>
294
+ | **CLI 桥接 (58)** | claude · codex · gemini · qwen · kiro · opencode · aider · goose |
197
295
 
198
296
  `unicli list` 查看完整列表 · `unicli list --category=<领域>` 按类别筛选。
199
297
 
@@ -269,7 +367,7 @@ BM25 + TF-IDF · 200 条 ZH↔EN 别名表 · 50KB 索引 · <10ms 查询。
269
367
 
270
368
  ## 理论基础
271
369
 
272
- 五条设计原则,每条对应 [`docs/refs.bib`](docs/refs.bib) 中的引用文献:
370
+ 五条可执行的设计原则:
273
371
 
274
372
  1. **Rice 限制** — 可判定的适配器语义(YAML 流水线,无图灵完备逻辑,可证明终止)
275
373
  2. **Lehman 命令** — 自修复是一等公民;没有永久有效的适配器;每个站点终将改变
@@ -277,7 +375,7 @@ BM25 + TF-IDF · 200 条 ZH↔EN 别名表 · 50KB 索引 · <10ms 查询。
277
375
  4. **Agent 工具三难困境**(原创贡献)— 覆盖率 × 准确率 × 性能,三选二。我们优化准确率 × 性能
278
376
  5. **Banach 收敛** — 结构化错误消息(`adapter_path` + `step` + `suggestion`)保证修复迭代收敛
279
377
 
280
- 42 条引用的完整论述:[`docs/THEORY.md`](docs/THEORY.md)。可复现的 token 基准测试:[`docs/BENCHMARK.md`](docs/BENCHMARK.md)。
378
+ 完整论述:[`docs/THEORY.md`](docs/THEORY.md)。可复现的本地基准测试:[`docs/BENCHMARK.md`](docs/BENCHMARK.md)。
281
379
 
282
380
  ## 开发
283
381
 
@@ -293,7 +391,7 @@ npm run verify # 类型检查 + lint + 测试 + 构建(7 个关卡,发布
293
391
  | `npm run build` | 生产构建 |
294
392
  | `npm run typecheck` | TypeScript 严格模式 |
295
393
  | `npm run lint` | Oxlint |
296
- | `npm run test` | 单元测试(<!-- STATS:test_count -->7145<!-- /STATS --> 个) |
394
+ | `npm run test` | 单元测试(<!-- STATS:test_count -->7160<!-- /STATS --> 个) |
297
395
  | `npm run test:adapter` | 验证所有适配器 |
298
396
  | `npm run verify` | 完整流水线 — 发布前必须通过 |
299
397
 
@@ -335,6 +433,5 @@ npm run verify # 类型检查 + lint + 测试 + 构建(7 个关卡,发布
335
433
  </p>
336
434
 
337
435
  <p align="center">
338
- <sub>v0.215.0 — Closed Adapter Loop</sub><br>
339
- <sub><!-- STATS:site_count -->220<!-- /STATS --> 个站点 · <!-- STATS:command_count -->1283<!-- /STATS --> 条命令 · <!-- STATS:pipeline_step_count -->59<!-- /STATS --> 个流水线步骤 · BM25+TF-IDF 中英双语搜索 · MCP 2025-11-25 · <!-- STATS:test_count -->7145<!-- /STATS --> 个测试</sub>
436
+ <sub>v0.215.1</sub>
340
437
  </p>
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Agent backend matrix — anti-consensus bridge policy.
3
+ *
4
+ * The core decision is deliberate: ACP is an editor compatibility protocol,
5
+ * not Uni-CLI's agent runtime. Prefer direct process/json/MCP routes for
6
+ * first-token latency, session ownership, and provider-specific features.
7
+ */
8
+ export type AgentProtocol = "native_cli" | "json_stream" | "mcp" | "acp" | "http_api" | "openai_compatible" | "gh_extension" | "terminal" | "api";
9
+ export type AgentRoute = "native_cli" | "json_stream" | "mcp" | "acpx" | "http_api" | "gh_extension" | "openai_compatible" | "api_cli";
10
+ export type AgentMaturity = "stable" | "fast-moving" | "experimental";
11
+ export type AgentBackendTier = "core" | "sota" | "bridge" | "watchlist";
12
+ export interface AgentBackendProfile {
13
+ id: string;
14
+ display_name: string;
15
+ aliases: string[];
16
+ binaries: string[];
17
+ primary_route: AgentRoute;
18
+ primary_protocol: AgentProtocol;
19
+ protocols: AgentProtocol[];
20
+ external_cli_name?: string;
21
+ tier: AgentBackendTier;
22
+ maturity: AgentMaturity;
23
+ install_hint: string;
24
+ probe: string;
25
+ strengths: string[];
26
+ risks: string[];
27
+ policy: string;
28
+ }
29
+ export interface AgentBackendRecommendation {
30
+ backend: AgentBackendProfile;
31
+ route: AgentRoute;
32
+ fallbacks: AgentProtocol[];
33
+ rationale: string;
34
+ risks: string[];
35
+ }
36
+ export type AgentBackendProfileInput = Omit<AgentBackendProfile, "primary_protocol"> & {
37
+ primary_protocol?: AgentProtocol;
38
+ };
39
+ export declare function buildAgentBackendMatrix(): AgentBackendProfile[];
40
+ export declare function findAgentBackend(name: string): AgentBackendProfile | undefined;
41
+ export declare function recommendAgentBackend(name: string): AgentBackendRecommendation;
42
+ //# sourceMappingURL=backends.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backends.d.ts","sourceRoot":"","sources":["../../src/agents/backends.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,MAAM,aAAa,GACrB,YAAY,GACZ,aAAa,GACb,KAAK,GACL,KAAK,GACL,UAAU,GACV,mBAAmB,GACnB,cAAc,GACd,UAAU,GACV,KAAK,CAAC;AAEV,MAAM,MAAM,UAAU,GAClB,YAAY,GACZ,aAAa,GACb,KAAK,GACL,MAAM,GACN,UAAU,GACV,cAAc,GACd,mBAAmB,GACnB,SAAS,CAAC;AAEd,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,aAAa,GAAG,cAAc,CAAC;AACtE,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAC;AAExE,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,EAAE,UAAU,CAAC;IAC1B,gBAAgB,EAAE,aAAa,CAAC;IAChC,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE,gBAAgB,CAAC;IACvB,QAAQ,EAAE,aAAa,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,mBAAmB,EACnB,kBAAkB,CACnB,GAAG;IACF,gBAAgB,CAAC,EAAE,aAAa,CAAC;CAClC,CAAC;AA4iBF,wBAAgB,uBAAuB,IAAI,mBAAmB,EAAE,CAW/D;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,GACX,mBAAmB,GAAG,SAAS,CAOjC;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,GACX,0BAA0B,CAsB5B"}