Skip to content

Commit 326f15a

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

19 files changed

Lines changed: 1864 additions & 26 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-17-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/2.0.x`
11-
> **Version**: `2.0.x.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 | 17+ | 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/2.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>2.0.x.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:2.0.x.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-17-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/2.0.x`
10-
> **版本**:`2.0.x.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 | 17+ | 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/2.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>2.0.x.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:2.0.x.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: 32 additions & 0 deletions
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;
@@ -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 客户端 */
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
package io.github.easy4j.opencli.adapter.browser.doubao;
2+
3+
import com.fasterxml.jackson.databind.JsonNode;
4+
import io.github.easy4j.opencli.core.OpenCliAdapterChannel;
5+
import io.github.easy4j.opencli.core.OpenCliArgSupport;
6+
import io.github.easy4j.opencli.core.OpenCliExecutor;
7+
import io.github.easy4j.opencli.core.OpenCliResult;
8+
import io.github.easy4j.opencli.core.OpenCliTypedResult;
9+
import io.github.easy4j.opencli.parser.OpenCliStdoutJson;
10+
import io.github.easy4j.opencli.registry.OpenCliAdapterIds;
11+
import io.github.easy4j.opencli.util.OpenCliLists;
12+
import java.util.ArrayList;
13+
import java.util.List;
14+
import lombok.Builder;
15+
import lombok.Data;
16+
import lombok.RequiredArgsConstructor;
17+
18+
/**
19+
* OpenCLI {@code doubao} 浏览器适配器 typed 客户端。
20+
*
21+
* <p>命令面与上游 {@code cli-manifest.json} 逐项对齐;位置参数在前、
22+
* 旗标在后;全部方法带 {@code more} 原生参数透传。</p>
23+
*
24+
* @author <a href="https://github.com/loong10k">Loong Wan</a>
25+
* @since 3.0.0
26+
*/
27+
@RequiredArgsConstructor
28+
public final class DoubaoOpenCliClient {
29+
30+
private final OpenCliExecutor executor;
31+
32+
private OpenCliAdapterChannel ch() {
33+
return new OpenCliAdapterChannel(executor, OpenCliAdapterIds.DOUBAO);
34+
}
35+
/** {@code doubao ask} 选项块。 */
36+
@Data
37+
@Builder(toBuilder = true)
38+
public static class DoubaoAskOptions {
39+
40+
private Integer timeoutSeconds;
41+
42+
/** 追加 {@code -f json}(全局格式旗标)。 */
43+
private Boolean jsonOutput;
44+
45+
public void appendTo(List<String> target) {
46+
if (timeoutSeconds != null) {
47+
OpenCliArgSupport.addOptionPair(target, "--timeout", String.valueOf(timeoutSeconds));
48+
}
49+
if (Boolean.TRUE.equals(jsonOutput)) {
50+
target.add("-f");
51+
target.add("json");
52+
}
53+
}
54+
}
55+
56+
57+
/** {@code doubao ask <text>}。 */
58+
public OpenCliResult ask(String text, DoubaoAskOptions options, List<String> more) {
59+
List<String> args = new ArrayList<>();
60+
args.add("ask");
61+
args.add(text);
62+
if (options != null) {
63+
options.appendTo(args);
64+
}
65+
return ch().invoke(OpenCliArgSupport.merge(args, more));
66+
}
67+
68+
/** {@code doubao ask <text> -f json},解析为 typed 结果。 */
69+
public OpenCliTypedResult<JsonNode> askTyped(String text, DoubaoAskOptions options, List<String> more) {
70+
DoubaoAskOptions withJson = options;
71+
if (withJson == null) {
72+
withJson = DoubaoAskOptions.builder().jsonOutput(true).build();
73+
} else if (!Boolean.TRUE.equals(withJson.getJsonOutput())) {
74+
withJson = withJson.toBuilder().jsonOutput(true).build();
75+
}
76+
return OpenCliStdoutJson.typed(ask(text, withJson, more));
77+
}
78+
79+
/** {@code doubao send <text>}(fire-and-forget)。 */
80+
public OpenCliResult send(String text, List<String> more) {
81+
List<String> args = new ArrayList<>();
82+
args.add("send");
83+
args.add(text);
84+
return ch().invoke(OpenCliArgSupport.merge(args, more));
85+
}
86+
87+
/** {@code doubao read}。 */
88+
public OpenCliResult read(List<String> more) {
89+
return ch().invoke(OpenCliArgSupport.merge(OpenCliLists.of("read"), more));
90+
}
91+
92+
/** {@code doubao detail <id>}。 */
93+
public OpenCliResult detail(String conversationId, List<String> more) {
94+
List<String> args = new ArrayList<>();
95+
args.add("detail");
96+
args.add(conversationId);
97+
return ch().invoke(OpenCliArgSupport.merge(args, more));
98+
}
99+
100+
/** {@code doubao history [--limit N]}。 */
101+
public OpenCliResult history(String limit, List<String> more) {
102+
List<String> args = new ArrayList<>();
103+
args.add("history");
104+
if (limit != null) {
105+
OpenCliArgSupport.addOptionPair(args, "--limit", limit);
106+
}
107+
return ch().invoke(OpenCliArgSupport.merge(args, more));
108+
}
109+
110+
/** {@code doubao meeting-summary <id>}。 */
111+
public OpenCliResult meetingSummary(String conversationId, String chapters, List<String> more) {
112+
List<String> args = new ArrayList<>();
113+
args.add("meeting-summary");
114+
args.add(conversationId);
115+
if (chapters != null) {
116+
OpenCliArgSupport.addOptionPair(args, "--chapters", chapters);
117+
}
118+
return ch().invoke(OpenCliArgSupport.merge(args, more));
119+
}
120+
121+
/** {@code doubao meeting-transcript <id>}。 */
122+
public OpenCliResult meetingTranscript(String conversationId, String download, List<String> more) {
123+
List<String> args = new ArrayList<>();
124+
args.add("meeting-transcript");
125+
args.add(conversationId);
126+
if (download != null) {
127+
OpenCliArgSupport.addOptionPair(args, "--download", download);
128+
}
129+
return ch().invoke(OpenCliArgSupport.merge(args, more));
130+
}
131+
132+
/** {@code doubao login [--timeout N]}。 */
133+
public OpenCliResult login(Integer timeoutSeconds, List<String> more) {
134+
List<String> args = new ArrayList<>();
135+
args.add("login");
136+
if (timeoutSeconds != null) {
137+
OpenCliArgSupport.addOptionPair(args, "--timeout", String.valueOf(timeoutSeconds));
138+
}
139+
return ch().invoke(OpenCliArgSupport.merge(args, more));
140+
}
141+
142+
/** {@code doubao new}。 */
143+
public OpenCliResult newChat(List<String> more) {
144+
return ch().invoke(OpenCliArgSupport.merge(OpenCliLists.of("new"), more));
145+
}
146+
147+
/** {@code doubao status}。 */
148+
public OpenCliResult status(List<String> more) {
149+
return ch().invoke(OpenCliArgSupport.merge(OpenCliLists.of("status"), more));
150+
}
151+
152+
/** {@code doubao whoami}。 */
153+
public OpenCliResult whoami(List<String> more) {
154+
return ch().invoke(OpenCliArgSupport.merge(OpenCliLists.of("whoami"), more));
155+
}
156+
}

0 commit comments

Comments
 (0)