Skip to content

Commit 01a732a

Browse files
committed
feat(adapter): 同步 3.0.x 五大浏览器 LLM 站点 typed 客户端——kimi/qwen/doubao/grok/yuanbao(Jackson 2 / JDK 8 适配)
1 parent 85cb997 commit 01a732a

19 files changed

Lines changed: 1866 additions & 28 deletions

‎README.md‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
[English](./README.md) | [简体中文](./README.zh-CN.md)
44

5-
[![Java](https://img.shields.io/badge/Java-8-orange)](https://github.com/easy-4-java/opencli-java-sdk) [![License](https://img.shields.io/badge/license-Apache%202.0-green)](./LICENSE)
5+
[![Java](https://img.shields.io/badge/Java-21-orange)](https://github.com/easy-4-java/opencli-java-sdk) [![License](https://img.shields.io/badge/license-Apache%202.0-green)](./LICENSE)
66

77
Multi-adapter CLI integration SDK for OpenCLI: browser / desktop / public-API adapters, remote agent and center WebSocket
88
[简体中文](./README.zh-CN.md)
99

10-
> **Current branch**: `feature/1.0.x`
11-
> **Version**: `1.0.x.20260630-SNAPSHOT`
12-
> **JDK baseline**: 8
13-
> **Project status**: stable (1.0.x line). Not yet published to Maven Central; artifacts are distributed via the Aliyun Maven repository and GitHub Releases.
10+
> **Current branch**: `feature/3.0.x`
11+
> **Version**: `3.0.x.20260630-SNAPSHOT`
12+
> **JDK baseline**: 21
13+
> **Project status**: stable (3.0.x line). Not yet published to Maven Central; artifacts are distributed via the Aliyun Maven repository and GitHub Releases.
1414
1515
## Table of Contents
1616

@@ -56,7 +56,7 @@ Multi-adapter CLI integration SDK for OpenCLI: browser / desktop / public-API ad
5656
| Local subprocess execution | Available | `OpenCliExecutor` (Commons Exec), unified exceptions (`OpenCliNonZeroExitException`, `OpenCliTimeoutException`, ...) |
5757
| Adapter channel | Available | `OpenCliAdapterChannel` (`invoke(List)` / varargs) |
5858
| Adapter registry | Available | `OpenCliAdapterIds` + `OpenCliAdapterTaxonomy` — 173 adapter ids (163 browser + 10 desktop) generated from the upstream manifest |
59-
| Typed wrappers | Available | `codex`, `cursor`, `gemini`, `claude`, `chatgpt`, `jimeng`, `deepseek`, `arxiv`, `npm`, `pypi`, `binance`, `wikipedia` |
59+
| Typed wrappers | Available | `codex`, `cursor`, `gemini`, `claude`, `chatgpt`, `jimeng`, `deepseek`, `kimi`, `qwen`, `doubao`, `grok`, `yuanbao`, `arxiv`, `npm`, `pypi`, `binance`, `wikipedia` |
6060
| Categorized facades | Available | `PublicApiClient`, `BrowserClient`, `DesktopClient` (or `publicApis()` / `browsers()` / `desktops()`) |
6161
| Meta commands | Available | `cli.meta()`: `list`, `validate`, `plugin`, `daemon`, `profile`, `completion`, `skills`, `auth`, `antigravity`, ... |
6262
| Built-in browser session API | Available | `cli.browser()`: `wait` (ms timeout), `extract`, `screenshot`, `getHtml`, ... |
@@ -70,7 +70,7 @@ Multi-adapter CLI integration SDK for OpenCLI: browser / desktop / public-API ad
7070

7171
| Component | Version | Notes |
7272
|---|---:|---|
73-
| JDK | 8+ | 1.0.x line baseline |
73+
| JDK | 21+ | 1.0.x line baseline |
7474
| commons-exec | — | Local subprocess execution |
7575
| Unirest Java | — | Remote agent HTTP |
7676
| Java-WebSocket | — | Center WebSocket |
@@ -81,7 +81,7 @@ Version-line matrix:
8181

8282
| Version line | Branch | JDK | Version pattern | Purpose |
8383
|---|---|---:|---|---|
84-
| 1.0.x | `feature/1.0.x` (this branch) | 8 | `1.0.x.*` | For Boot 2.x starters and legacy projects |
84+
| 1.0.x | `feature/1.0.x` | 8 | `1.0.x.*` | For Boot 2.x starters and legacy projects |
8585
| 2.0.x | `feature/2.0.x` | 17 | `2.0.x.*` | For Boot 3.x starters |
8686
| 3.0.x | `feature/3.0.x` | 21 | `3.0.x.*` | For Boot 4.x starters / new projects |
8787

@@ -115,7 +115,7 @@ Single-module library (packaging `jar`). Package layout:
115115
|---|---|
116116
| `io.github.easy4j.opencli` | Facade `OpenCliClient`, `OpenCliProperties`, `OpenCliExecutionTarget` |
117117
| `io.github.easy4j.opencli.core` | `OpenCliExecutor`, `OpenCliAdapterChannel`, results, availability |
118-
| `io.github.easy4j.opencli.adapter` | Typed adapter clients (browser: chatgpt/claude/deepseek/gemini/jimeng; desktop: codex/cursor; publicapi: arxiv/binance/npm/pypi/wikipedia) |
118+
| `io.github.easy4j.opencli.adapter` | Typed adapter clients (browser: chatgpt/claude/deepseek/gemini/jimeng/kimi/qwen/doubao/grok/yuanbao; desktop: codex/cursor; publicapi: arxiv/binance/npm/pypi/wikipedia) |
119119
| `io.github.easy4j.opencli.browser` | Built-in browser session client + options |
120120
| `io.github.easy4j.opencli.facade` | `PublicApiClient` / `BrowserClient` / `DesktopClient` |
121121
| `io.github.easy4j.opencli.meta` | Meta clients (`list`, `plugin`, `daemon`, `profile`, `skills`, `auth`, ...) |
@@ -133,14 +133,14 @@ Maven:
133133
<dependency>
134134
<groupId>io.github.easy4j</groupId>
135135
<artifactId>opencli-java-sdk</artifactId>
136-
<version>1.0.x.20260630-SNAPSHOT</version>
136+
<version>3.0.x.20260630-SNAPSHOT</version>
137137
</dependency>
138138
```
139139

140140
Gradle:
141141

142142
```groovy
143-
implementation 'io.github.easy4j:opencli-java-sdk:1.0.x.20260630-SNAPSHOT'
143+
implementation 'io.github.easy4j:opencli-java-sdk:3.0.x.x.20260630-SNAPSHOT'
144144
```
145145

146146
Snapshot builds require an enabled snapshot repository (Aliyun Maven snapshot repository per `distributionManagement` in `pom.xml`).
@@ -231,7 +231,7 @@ Protocol: edge sends `register`; center replies `registered`; center sends `coll
231231
mvn clean verify
232232
```
233233

234-
- Unit tests cover the adapter registry, core execution, browser/meta/remote paths and WS helpers (14 test sources under `src/test`).
234+
- Unit tests cover the adapter registry, core execution, browser/meta/remote paths and WS helpers (19 Java test sources under `src/test`).
235235
- JaCoCo runs `prepare-agent`, `report` and `check` on the `verify` phase with a **90% line-coverage** rule (`haltOnFailure=false`).
236236
- `scripts/generate_opencli_adapter_ids.py` regenerates `OpenCliAdapterIds` / `OpenCliAdapterTaxonomy` from the upstream `opencli/docs/adapters/index.md` + `cli-manifest.json` (set `OPENCLI_ROOT` to point at the upstream tree).
237237
- Release packaging (`mvn -Prelease deploy`) attaches sources and javadoc jars, GPG-signs artifacts and is wired for Sonatype Central Publishing; plain `mvn deploy` routes SNAPSHOT/release artifacts to the Aliyun Maven repository per `distributionManagement`.
@@ -243,7 +243,7 @@ mvn clean verify
243243
|---|---|---|---|
244244
| `feature/1.0.x` (this branch) | `1.0.x.*` | 8 | Compatibility fixes and JDK-8-safe dependency upgrades only |
245245
| `feature/2.0.x` | `2.0.x.*` | 17 | JDK 17 line |
246-
| `feature/3.0.x` | `3.0.x.*` | 21 | JDK 21 line |
246+
| `feature/3.0.x` (this branch) | `3.0.x.*` | 21 | JDK 21 line |
247247

248248
Branch POMs (JDK and dependency stack per line) are rendered by `scripts/render-branch-pom.py`.
249249

‎README.zh-CN.md‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
[English](./README.md) | [简体中文](./README.zh-CN.md)
44

5-
[![Java](https://img.shields.io/badge/Java-8-orange)](https://github.com/easy-4-java/opencli-java-sdk) [![License](https://img.shields.io/badge/license-Apache%202.0-green)](./LICENSE)
5+
[![Java](https://img.shields.io/badge/Java-21-orange)](https://github.com/easy-4-java/opencli-java-sdk) [![License](https://img.shields.io/badge/license-Apache%202.0-green)](./LICENSE)
66

77
面向 OpenCLI 多适配器体系的 Java SDK:browser / desktop / public-api 适配器、远程 Agent 与中心 WebSocket
88

9-
> **当前分支**:`feature/1.0.x`
10-
> **版本**:`1.0.x.20260630-SNAPSHOT`
11-
> **JDK 基线**:8
12-
> **项目状态**:稳定(1.0.x 线)。尚未发布 Maven Central;制品通过 Aliyun Maven 仓库与 GitHub Releases 分发。
9+
> **当前分支**:`feature/3.0.x`
10+
> **版本**:`3.0.x.20260630-SNAPSHOT`
11+
> **JDK 基线**:21
12+
> **项目状态**:稳定(3.0.x 线)。尚未发布 Maven Central;制品通过 Aliyun Maven 仓库与 GitHub Releases 分发。
1313
1414
## 目录
1515

@@ -55,7 +55,7 @@
5555
| 本地子进程执行 | 可用 | `OpenCliExecutor`(Commons Exec),统一异常(`OpenCliNonZeroExitException`、`OpenCliTimeoutException` 等) |
5656
| 适配器通道 | 可用 | `OpenCliAdapterChannel`(`invoke(List)` / 可变参数) |
5757
| 适配器注册表 | 可用 | `OpenCliAdapterIds` + `OpenCliAdapterTaxonomy`——共 173 个 adapter id(163 browser + 10 desktop),由上游清单生成 |
58-
| 强类型封装 | 可用 | `codex`、`cursor`、`gemini`、`claude`、`chatgpt`、`jimeng`、`deepseek`、`arxiv`、`npm`、`pypi`、`binance`、`wikipedia` |
58+
| 强类型封装 | 可用 | `codex`、`cursor`、`gemini`、`claude`、`chatgpt`、`jimeng`、`deepseek`、`kimi`、`qwen`、`doubao`、`grok`、`yuanbao`、`arxiv`、`npm`、`pypi`、`binance`、`wikipedia` |
5959
| 分类门面 | 可用 | `PublicApiClient`、`BrowserClient`、`DesktopClient`(或 `publicApis()` / `browsers()` / `desktops()`) |
6060
| 元命令 | 可用 | `cli.meta()`:`list`、`validate`、`plugin`、`daemon`、`profile`、`completion`、`skills`、`auth`、`antigravity` 等 |
6161
| 内置 browser 会话 API | 可用 | `cli.browser()`:`wait`(毫秒超时)、`extract`、`screenshot`、`getHtml` 等 |
@@ -69,7 +69,7 @@
6969

7070
| 组件 | 版本 | 说明 |
7171
|---|---:|---|
72-
| JDK | 8+ | 1.0.x 线基线 |
72+
| JDK | 21+ | 1.0.x 线基线 |
7373
| commons-exec | — | 本地子进程执行 |
7474
| Unirest Java | — | 远程 Agent HTTP |
7575
| Java-WebSocket | — | 中心 WebSocket |
@@ -80,7 +80,7 @@
8080

8181
| 版本线 | 分支 | JDK | 版本模式 | 用途 |
8282
|---|---|---:|---|---|
83-
| 1.0.x | `feature/1.0.x`(当前分支) | 8 | `1.0.x.*` | 供 Boot 2.x Starter 与存量项目使用 |
83+
| 1.0.x | `feature/1.0.x` | 8 | `1.0.x.*` | 供 Boot 2.x Starter 与存量项目使用 |
8484
| 2.0.x | `feature/2.0.x` | 17 | `2.0.x.*` | 供 Boot 3.x Starter 使用 |
8585
| 3.0.x | `feature/3.0.x` | 21 | `3.0.x.*` | 供 Boot 4.x Starter / 新项目使用 |
8686

@@ -114,7 +114,7 @@
114114
|---|---|
115115
| `io.github.easy4j.opencli` | 门面 `OpenCliClient`、`OpenCliProperties`、`OpenCliExecutionTarget` |
116116
| `io.github.easy4j.opencli.core` | `OpenCliExecutor`、`OpenCliAdapterChannel`、结果对象、可用性探测 |
117-
| `io.github.easy4j.opencli.adapter` | 强类型适配器客户端(browser:chatgpt/claude/deepseek/gemini/jimeng;desktop:codex/cursor;publicapi:arxiv/binance/npm/pypi/wikipedia) |
117+
| `io.github.easy4j.opencli.adapter` | 强类型适配器客户端(browser:chatgpt/claude/deepseek/gemini/jimeng/kimi/qwen/doubao/grok/yuanbao;desktop:codex/cursor;publicapi:arxiv/binance/npm/pypi/wikipedia) |
118118
| `io.github.easy4j.opencli.browser` | 内置 browser 会话客户端与选项 |
119119
| `io.github.easy4j.opencli.facade` | `PublicApiClient` / `BrowserClient` / `DesktopClient` |
120120
| `io.github.easy4j.opencli.meta` | 元命令客户端(`list`、`plugin`、`daemon`、`profile`、`skills`、`auth` 等) |
@@ -132,14 +132,14 @@ Maven:
132132
<dependency>
133133
<groupId>io.github.easy4j</groupId>
134134
<artifactId>opencli-java-sdk</artifactId>
135-
<version>1.0.x.20260630-SNAPSHOT</version>
135+
<version>3.0.x.20260630-SNAPSHOT</version>
136136
</dependency>
137137
```
138138

139139
Gradle:
140140

141141
```groovy
142-
implementation 'io.github.easy4j:opencli-java-sdk:1.0.x.20260630-SNAPSHOT'
142+
implementation 'io.github.easy4j:opencli-java-sdk:3.0.x.x.20260630-SNAPSHOT'
143143
```
144144

145145
快照版本需要启用对应快照仓库(`pom.xml` 中 `distributionManagement` 指向 Aliyun Maven 仓库)。
@@ -230,7 +230,7 @@ agent.close();
230230
mvn clean verify
231231
```
232232

233-
- 单元测试覆盖适配器注册表、核心执行、browser / meta / remote 路径与 WS 工具(`src/test` 下 14 个测试源文件)。
233+
- 单元测试覆盖适配器注册表、核心执行、browser / meta / remote 路径与 WS 工具(`src/test` 下 19 个 Java 测试源文件)。
234234
- JaCoCo 在 `verify` 阶段执行 `prepare-agent`、`report` 与 `check`,行覆盖率规则为 **90%**(`haltOnFailure=false`)。
235235
- `scripts/generate_opencli_adapter_ids.py` 依据上游 `opencli/docs/adapters/index.md` + `cli-manifest.json` 重新生成 `OpenCliAdapterIds` / `OpenCliAdapterTaxonomy`(可用 `OPENCLI_ROOT` 指定上游源码树)。
236236
- 发布打包(`mvn -Prelease deploy`)附带 sources 与 javadoc 构件并执行 GPG 签名,对接 Sonatype Central Publishing;普通 `mvn deploy` 按版本后缀路由到 Aliyun Maven 仓库(见 `distributionManagement`)。
@@ -242,7 +242,7 @@ mvn clean verify
242242
|---|---|---|---|
243243
| `feature/1.0.x`(当前分支) | `1.0.x.*` | 8 | 仅接受兼容性修复与 JDK 8 安全的依赖升级 |
244244
| `feature/2.0.x` | `2.0.x.*` | 17 | JDK 17 线 |
245-
| `feature/3.0.x` | `3.0.x.*` | 21 | JDK 21 线 |
245+
| `feature/3.0.x`(当前分支) | `3.0.x.*` | 21 | JDK 21 线 |
246246

247247
各分支 POM(JDK 与依赖栈随线变化)由 `scripts/render-branch-pom.py` 渲染。
248248

‎src/main/java/io/github/easy4j/opencli/OpenCliClient.java‎

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33
import io.github.easy4j.opencli.adapter.browser.chatgpt.ChatgptOpenCliClient;
44
import io.github.easy4j.opencli.adapter.browser.claude.ClaudeOpenCliClient;
55
import io.github.easy4j.opencli.adapter.browser.deepseek.DeepseekOpenCliClient;
6+
import io.github.easy4j.opencli.adapter.browser.doubao.DoubaoOpenCliClient;
67
import io.github.easy4j.opencli.adapter.browser.gemini.GeminiOpenCliClient;
8+
import io.github.easy4j.opencli.adapter.browser.grok.GrokOpenCliClient;
79
import io.github.easy4j.opencli.adapter.browser.jimeng.JimengOpenCliClient;
10+
import io.github.easy4j.opencli.adapter.browser.kimi.KimiOpenCliClient;
11+
import io.github.easy4j.opencli.adapter.browser.qwen.QwenOpenCliClient;
12+
import io.github.easy4j.opencli.adapter.browser.yuanbao.YuanbaoOpenCliClient;
813
import io.github.easy4j.opencli.adapter.desktop.codex.CodexOpenCliClient;
914
import io.github.easy4j.opencli.adapter.desktop.cursor.CursorOpenCliClient;
1015
import io.github.easy4j.opencli.adapter.publicapi.arxiv.ArxivOpenCliClient;
@@ -32,7 +37,7 @@
3237
* OpenCliResult result = client.chatgpt().ask("hello", null, null);
3338
* }</pre>
3439
*
35-
* @author <a href="https://github.com/loong10k">Loong Wan</a>
40+
* @author [@Loong Wan](https://github.com/loong10k)
3641
* @since 3.0.0
3742
*/public class OpenCliClient {
3843

@@ -117,6 +122,33 @@ public DeepseekOpenCliClient deepseek() {
117122
return new DeepseekOpenCliClient(executor);
118123
}
119124

125+
// ----- 浏览器强类型门面(新增五大站点) -----
126+
127+
/** @return Kimi Web 适配器 typed 客户端 */
128+
public KimiOpenCliClient kimi() {
129+
return new KimiOpenCliClient(executor);
130+
}
131+
132+
/** @return 通义千问 Web 适配器 typed 客户端 */
133+
public QwenOpenCliClient qwen() {
134+
return new QwenOpenCliClient(executor);
135+
}
136+
137+
/** @return 豆包 Web 适配器 typed 客户端 */
138+
public DoubaoOpenCliClient doubao() {
139+
return new DoubaoOpenCliClient(executor);
140+
}
141+
142+
/** @return Grok Web 适配器 typed 客户端 */
143+
public GrokOpenCliClient grok() {
144+
return new GrokOpenCliClient(executor);
145+
}
146+
147+
/** @return 腾讯元宝 Web 适配器 typed 客户端 */
148+
public YuanbaoOpenCliClient yuanbao() {
149+
return new YuanbaoOpenCliClient(executor);
150+
}
151+
120152
// ----- 参考强类型门面(Public API) -----
121153

122154
/** @return arXiv 公共 API 客户端 */

0 commit comments

Comments
 (0)