dsh-cliworker-now 0.7.7 → 0.7.8
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.en.md +29 -7
- package/README.md +30 -7
- package/lib/account-models.mjs +33 -5
- package/lib/client.js +575 -102
- package/lib/client.js.map +1 -1
- package/lib/index.js +7573 -6269
- package/lib/index.js.map +1 -1
- package/lib/pi-native-catalog.mjs +15 -5
- package/lib/pi-omp-refresh.mjs +3 -3
- package/lib/typert.host.js +194 -26
- package/lib/typert.remote-client.d.ts +6 -0
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +176 -26
- package/lib/types/client/cli-executable-settings.d.ts +13 -0
- package/lib/types/client/cli-executable-settings.js +128 -0
- package/lib/types/client/cli-executable-settings.js.map +1 -0
- package/lib/types/client/management-styles.d.ts +1 -1
- package/lib/types/client/management-styles.js +4 -0
- package/lib/types/client/management-styles.js.map +1 -1
- package/lib/types/client/settings-dialog.js +134 -45
- package/lib/types/client/settings-dialog.js.map +1 -1
- package/lib/types/client/styles.d.ts +1 -1
- package/lib/types/client/styles.js +18 -16
- package/lib/types/client/styles.js.map +1 -1
- package/lib/types/host/account-models.d.mts +7 -1
- package/lib/types/host/account-models.mjs +33 -5
- package/lib/types/host/accounts.js +51 -19
- package/lib/types/host/accounts.js.map +1 -1
- package/lib/types/host/adapters.d.ts +2 -0
- package/lib/types/host/adapters.js +93 -15
- package/lib/types/host/adapters.js.map +1 -1
- package/lib/types/host/agy-background-environment.d.ts +2 -0
- package/lib/types/host/agy-background-environment.js +7 -0
- package/lib/types/host/agy-background-environment.js.map +1 -0
- package/lib/types/host/claude-native-oauth.js +2 -0
- package/lib/types/host/claude-native-oauth.js.map +1 -1
- package/lib/types/host/claude-own-route.d.ts +15 -3
- package/lib/types/host/claude-own-route.js +158 -33
- package/lib/types/host/claude-own-route.js.map +1 -1
- package/lib/types/host/cli-account-binding.js +9 -4
- package/lib/types/host/cli-account-binding.js.map +1 -1
- package/lib/types/host/cli-executable-paths.d.ts +30 -0
- package/lib/types/host/cli-executable-paths.js +272 -0
- package/lib/types/host/cli-executable-paths.js.map +1 -0
- package/lib/types/host/codex-models.d.ts +3 -1
- package/lib/types/host/codex-models.js +37 -4
- package/lib/types/host/codex-models.js.map +1 -1
- package/lib/types/host/first-party-models.d.ts +4 -0
- package/lib/types/host/first-party-models.js +43 -9
- package/lib/types/host/first-party-models.js.map +1 -1
- package/lib/types/host/hermes-accounts.js +54 -9
- package/lib/types/host/hermes-accounts.js.map +1 -1
- package/lib/types/host/hermes-models.js +21 -2
- package/lib/types/host/hermes-models.js.map +1 -1
- package/lib/types/host/index.d.ts +10 -0
- package/lib/types/host/index.js +121 -6
- package/lib/types/host/index.js.map +1 -1
- package/lib/types/host/native-process.js +14 -4
- package/lib/types/host/native-process.js.map +1 -1
- package/lib/types/host/opencode-native.js +13 -0
- package/lib/types/host/opencode-native.js.map +1 -1
- package/lib/types/host/pi-omp-adapter.js +2 -2
- package/lib/types/host/pi-omp-adapter.js.map +1 -1
- package/lib/types/host/pi-omp-native.js +5 -3
- package/lib/types/host/pi-omp-native.js.map +1 -1
- package/lib/types/host/pi-omp-refresh.mjs +3 -3
- package/lib/types/host/process.d.ts +3 -0
- package/lib/types/host/process.js +3 -1
- package/lib/types/host/process.js.map +1 -1
- package/lib/types/host/runtime.js +5 -1
- package/lib/types/host/runtime.js.map +1 -1
- package/lib/types/host/settings-catalog-cache.d.ts +28 -0
- package/lib/types/host/settings-catalog-cache.js +189 -0
- package/lib/types/host/settings-catalog-cache.js.map +1 -0
- package/lib/types/host/windows-cli-installation.d.ts +4 -0
- package/lib/types/host/windows-cli-installation.js +7 -0
- package/lib/types/host/windows-cli-installation.js.map +1 -1
- package/lib/types/host/windows-codex-launch.d.ts +9 -0
- package/lib/types/host/windows-codex-launch.js +216 -0
- package/lib/types/host/windows-codex-launch.js.map +1 -0
- package/lib/types/host/windows-desktop-cli-installation.d.ts +20 -0
- package/lib/types/host/windows-desktop-cli-installation.js +420 -0
- package/lib/types/host/windows-desktop-cli-installation.js.map +1 -0
- package/lib/types/host/windows-hidden-launch.mjs +3 -1
- package/lib/types/shared/cli-settings.d.ts +8 -0
- package/lib/windows-hidden-launch.mjs +3 -1
- package/package.json +2 -2
package/README.en.md
CHANGED
|
@@ -17,6 +17,8 @@ Choose a CLI, model and role, dispatch a named agent, follow its work in the sid
|
|
|
17
17
|
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
|
+
The current version is **v0.7.8**. Routine changes use focused verification; full acceptance runs during an approved release.
|
|
21
|
+
|
|
20
22
|
**On this page**
|
|
21
23
|
|
|
22
24
|
[1. Overview](#1-overview) · [2. Features](#2-features) · [3. Screenshots](#3-features-in-the-interface) · [4. Support](#4-requirements-and-cli-support) · [5. Installation](#5-installation-and-updates) · [6. Usage](#6-using-cli-worker-now) · [7. Permissions and FAQ](#7-permissions-data-and-faq) · [8. Development](#8-development-and-verification) · [9. Documentation](#9-documentation-feedback-and-license)
|
|
@@ -70,7 +72,9 @@ The settings dialog manages role cards by name and summary. Seven writing roles
|
|
|
70
72
|
|
|
71
73
|
### 3.3 CLI connections, accounts and model preferences
|
|
72
74
|
|
|
73
|
-
Enable each CLI separately and manage its account, project default model and reasoning effort. Supported CLIs can open their native account terminal. Authentication information follows the CLI's actual account source.
|
|
75
|
+
Enable each CLI separately and manage its account, project default model and reasoning effort. Selecting a model or effort saves the project defaults automatically; opening settings or refreshing the list does not change them. Save failures remain visible and can be retried by selecting again. Supported CLIs can open their native account terminal. Authentication information follows the CLI's actual account source.
|
|
76
|
+
|
|
77
|
+
After each Harness start, opening a CLI settings page for the first time discovers and saves its model and effort choices. Later opens reuse the verified list. The next start refreshes the list and rewrites the cache only when it changes. Valid saved defaults remain selected; unavailable defaults require a new choice. Refresh Models forces a new check.
|
|
74
78
|
|
|
75
79
|

|
|
76
80
|
|
|
@@ -117,18 +121,28 @@ MiMo reuses a bounded, short-lived in-memory cache of native capabilities to red
|
|
|
117
121
|
|
|
118
122
|
The settings dialog allows at most two concurrent account-status requests, including the selected CLI. The selected item goes first when settings opens; switching only reprioritizes queued requests. Model catalogs are queried separately, so this is not a limit on all subprocesses. Closing or disabling cancels the relevant reads; Host remains responsible for process cleanup.
|
|
119
123
|
|
|
120
|
-
Verified Kimi managed OAuth model capabilities and Claude command-parameter capabilities can also be reused briefly. Each catalog
|
|
124
|
+
Verified Kimi managed OAuth model capabilities and Claude command-parameter capabilities can also be reused briefly. Each actual catalog rediscovery still checks current credentials, expiry and remote access; remote quota is not cached. Windows launchers hide extra console windows for background queries and embedded account terminals.
|
|
125
|
+
|
|
126
|
+
Initial settings loading, refreshes and automatic model/effort saves retain their account and catalog checks. For the verified Codex npm 0.162.1 launcher, Windows background calls use the native CLI from the same installation, avoiding an extra terminal created inside the JavaScript launcher. The saved installation path, package-manager environment and process cleanup are preserved. Other launcher revisions keep their existing behavior; see the [verification log](doc/tasks.md) for the observed window coverage.
|
|
127
|
+
|
|
128
|
+
On Windows, background Antigravity model queries and tasks use the official environment switch to disable auto-update for that child process, preventing its updater from opening another terminal. This does not change updates in user-opened Antigravity terminals or behavior on macOS.
|
|
121
129
|
|
|
122
130
|
Successful extended-CLI catalog queries remove their private temporary directory and extracted native cache after process exit is confirmed. Failed or unconfirmed cleanup preserves the query files and never deletes native account files.
|
|
123
131
|
|
|
124
132
|
Probe records: [ZCode](doc/zcode-probe.md) · [Grok](doc/grok-probe.md) · [Pi / OMP](doc/pi-omp-probe.md) · [Hermes](doc/hermes-probe.md) · [OpenCode](doc/opencode-probe.md)
|
|
125
133
|
|
|
134
|
+
### Claude Code with CC Switch
|
|
135
|
+
|
|
136
|
+
On macOS and Windows, the plugin reads Claude Code's current own settings. With routing disabled, sign in to the official Claude account in the plugin account section. With routing enabled, refresh Claude's model list and select a routed model. Official login and logout preserve CC Switch settings.
|
|
137
|
+
|
|
138
|
+
Native mappings, including Fable and the `[1m]` context suffix, retain their exact execution IDs. When a gateway does not implement model discovery, only its explicitly configured models are shown, with remote availability stated as unverified. Authentication rejection and query errors do not switch to the official account. Select again after changing routes or mappings; an existing task whose source changed requires a new task.
|
|
139
|
+
|
|
126
140
|
## 5. Installation and updates
|
|
127
141
|
|
|
128
142
|
### 5.1 One-line install
|
|
129
143
|
|
|
130
144
|
```sh
|
|
131
|
-
dsh plugin --profile desktop add dsh-cliworker-now@
|
|
145
|
+
dsh plugin --profile desktop add dsh-cliworker-now@latest
|
|
132
146
|
```
|
|
133
147
|
|
|
134
148
|
<details>
|
|
@@ -137,15 +151,15 @@ dsh plugin --profile desktop add dsh-cliworker-now@0.7.7
|
|
|
137
151
|
For the Web profile:
|
|
138
152
|
|
|
139
153
|
```sh
|
|
140
|
-
dsh plugin --profile web add dsh-cliworker-now@
|
|
154
|
+
dsh plugin --profile web add dsh-cliworker-now@latest
|
|
141
155
|
```
|
|
142
156
|
|
|
143
|
-
Finish active tasks and fully quit Harness before installation or updates, then reopen it. The npm package is prebuilt and needs no manual extraction or compilation. You can also enter `dsh-cliworker-now@
|
|
157
|
+
Finish active tasks and fully quit Harness before installation or updates, then reopen it. Each run of the `@latest` command installs or updates to the version currently tagged latest on npm. Starting Harness does not automatically update the plugin. The npm package is prebuilt and needs no manual extraction or compilation. You can also enter `dsh-cliworker-now@latest` in the plugin manager's Add Plugin dialog.
|
|
144
158
|
|
|
145
159
|
GitHub Release fallback:
|
|
146
160
|
|
|
147
161
|
```sh
|
|
148
|
-
dsh plugin --profile desktop add https://github.com/SuperWheel/cliworker-now/releases/download/v0.7.
|
|
162
|
+
dsh plugin --profile desktop add https://github.com/SuperWheel/cliworker-now/releases/download/v0.7.8/dsh-cliworker-now-0.7.8.tgz
|
|
149
163
|
```
|
|
150
164
|
|
|
151
165
|
For source development:
|
|
@@ -199,7 +213,7 @@ Later invocations in the same main conversation use its confirmed setup, includi
|
|
|
199
213
|
|
|
200
214
|
Each explicit CLI request includes routing guidance in that same model request: call `cliworker_start` to open setup. The plugin collects model, effort and role before launching, so the main model needs no preliminary role or launch questions. Every call must explicitly include `cli`, including Antigravity. A missing selector returns a parameter error instead of using a previous or default CLI. The ordinary question tool remains unchanged.
|
|
201
215
|
|
|
202
|
-
All 11 CLIs use only their own native login or an API key configured in that CLI's own settings or private `.env`.
|
|
216
|
+
All 11 CLIs use only their own native login or an API key configured in that CLI's own settings or private `.env`. Models and reasoning efforts are filtered by CLI capabilities and the current account's available scope. Claude's explicit own gateway configuration follows the separate rules in section 4, showing configured candidates with remote availability stated as unverified. A public catalog, old cache, fixed alias or anonymous free model alone does not establish availability. Choices that do not meet these evidence requirements stay unavailable, with a short reason. Permission discovery uses read-only metadata, rather than generation requests.
|
|
203
217
|
|
|
204
218
|
Model menus show readable names without provider or organization path prefixes or parenthesized notes, and deduplicate the same native model. Distinct models with the same short name remain separate options. Saved choices and execution retain the full route ID. For a new choice, models with confirmed available free allowance appear first; missing prices and default zero-cost metadata are not treated as proof of free access. Existing valid choices remain, and a failed free route never silently becomes a paid request.
|
|
205
219
|
|
|
@@ -209,8 +223,16 @@ macOS and Windows share the same account terminal with text selection and copyin
|
|
|
209
223
|
|
|
210
224
|
Windows discovers the CLI inside the current user’s verified official Codex app package, the official npm entry, and Hermes’s official installation directory. An incomplete installation without an executable is reported explicitly.
|
|
211
225
|
|
|
226
|
+
Each CLI settings page has a separate **Advanced settings** section, collapsed by default. Use its right-hand arrow to expand and manage the CLI path: the first successful discovery is saved locally and reused, or enter a full file path and click Refresh to update CLI status. Restore automatic discovery removes the local selection. Paths are shared across projects on the same machine and OS; manual choices take precedence over deployment configuration, which takes precedence over automatically saved paths. A missing automatic path triggers discovery again; an invalid manual path remains selected and reports an error. Enter the CLI file, without a desktop GUI, directory, command arguments or surrounding quotes.
|
|
227
|
+
|
|
228
|
+
Headings, labels, spacing, dividers and controls follow the [shared settings design specification](doc/settings-ui-design.md). Future settings reuse the same parameters.
|
|
229
|
+
|
|
230
|
+
Windows also discovers ZCode and OpenCode in custom directories through known default directories, per-user/system installation records, image paths of already running product processes, and Start menu/Desktop shortcuts, including non-system drives and paths with spaces or Chinese characters. ZCode requires its bundled CLI and provider file; OpenCode requires a real standalone `opencode-cli.exe`. Desktop versions without that CLI report the missing component. Explicit paths, a deployed ZCode runtime and working PATH entries retain priority. Multiple usable installations require `zcodeExecutable` / `opencodeExecutable`; `DisplayIcon` is an installation registry value, not a requirement for a visible desktop icon. Portable folders in arbitrary locations without registration, shortcuts or PATH still need explicit configuration when the application is not running. Finding the CLI does not establish login or model access.
|
|
231
|
+
|
|
212
232
|
Windows supports the verified official Pi launcher and the native executable declared by the OpenCode npm package. The plugin parses their fixed launch commands and validates installation identity. Unrecognized or broken entries require an installation check. Other Pi versions require SDK/RPC and native menu verification before support is added.
|
|
213
233
|
|
|
234
|
+
Desktop installation checks use physical files, accounting for Electron's ASAR handling. A valid OpenCode npm CLI does not require a neighboring desktop archive. No CLI reinstall or account reconfiguration is needed.
|
|
235
|
+
|
|
214
236
|
Settings prioritize the selected CLI and limit background account checks to two at a time. Verified Kimi OAuth model capabilities and Claude command capabilities can be reused briefly, while credentials, expiry and remote allowance are checked again. Windows metadata and embedded account launchers hide additional console windows. Codex reports confirmed exhausted quota separately from unavailable authentication; native model capabilities alone do not establish permission to run a task.
|
|
215
237
|
|
|
216
238
|
OMP, Pi, Hermes and OpenCode display their own provider and authentication method. Account logins use a concise label such as `OpenAI账号登录`; full safe identity details and other API sources remain in the hover text. API-only authentication uses a label such as `zai.cn API 登录`. Valid authentication is not reduced to a generic “configured” state; model access is checked separately.
|
package/README.md
CHANGED
|
@@ -12,11 +12,14 @@
|
|
|
12
12
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
13
13
|
[](#4-环境与-cli-支持)
|
|
14
14
|
[](LICENSE)
|
|
15
|
+
[](https://dshfind.com/zh/plugins/SuperWheel/cliworker-now?ref=badge)
|
|
15
16
|
|
|
16
17
|
[下载安装包](https://github.com/SuperWheel/cliworker-now/releases/latest) · [安装方法](#5-安装与更新) · [开始使用](#6-使用方法) · [反馈问题](https://github.com/SuperWheel/cliworker-now/issues)
|
|
17
18
|
|
|
18
19
|
</div>
|
|
19
20
|
|
|
21
|
+
当前版本为 **v0.7.8**。日常调整只做关联最小验收,全量验收用于获准的版本发布。
|
|
22
|
+
|
|
20
23
|
**阅读导航**
|
|
21
24
|
|
|
22
25
|
[1. 项目定位](#1-项目定位) · [2. 特点与优势](#2-特点与优势) · [3. 界面效果](#3-功能与界面效果) · [4. 支持范围](#4-环境与-cli-支持) · [5. 安装更新](#5-安装与更新) · [6. 使用方法](#6-使用方法) · [7. 常见问题](#7-权限数据与常见问题) · [8. 开发验证](#8-开发与验证) · [9. 文档与反馈](#9-文档反馈与许可)
|
|
@@ -70,7 +73,9 @@ CLI Worker Now 是 **DeepSeek Harness 的独立多 CLI 智能体插件**。它
|
|
|
70
73
|
|
|
71
74
|
### 3.3 CLI 连接、账号与模型偏好
|
|
72
75
|
|
|
73
|
-
每个 CLI
|
|
76
|
+
每个 CLI 可以单独开启或关闭,分别管理账号、项目默认模型与思考强度。选择模型或思考强度后自动保存项目默认值,打开设置或刷新列表不会改写偏好;保存失败会显示原因,可重新选择重试。支持的 CLI 可直接打开原生账号终端;登录状态与账号来源按各 CLI 的实际能力显示。
|
|
77
|
+
|
|
78
|
+
每次启动 Harness 后,首次打开某个 CLI 的设置会重新识别并保存模型与思考强度的可选列表;本次运行再次打开时自动填入已核验列表。重启后重新识别,只有内容变化才更新缓存。已选默认值仍有效时保留,失效则提示重新选择;也可点击刷新模型主动重查。
|
|
74
79
|
|
|
75
80
|
macOS 与 Windows 共用同一账号终端,支持选择文字复制及 Cmd+V/Ctrl+V 粘贴;右键在有选区时复制、无选区时粘贴,输入位置使用闪烁块状光标。登录时直接打开原生授权网页;Windows ZCode 的完整登录网址也可在终端点击或选择复制到浏览器。
|
|
76
81
|
|
|
@@ -118,18 +123,28 @@ MiMo 短时间重复加载模型能力时复用有界内存缓存,减少 Windo
|
|
|
118
123
|
|
|
119
124
|
设置页的账号状态请求最多两个并发,包含当前选中的 CLI。首次打开优先当前项,切换时只调整待排顺序;模型目录另行查询,因此这不是全部子进程的数量上限。关闭或禁用会取消对应读取,底层进程清理仍由 Host 管理。
|
|
120
125
|
|
|
121
|
-
Kimi 已核验的 managed OAuth 模型能力和 Claude
|
|
126
|
+
Kimi 已核验的 managed OAuth 模型能力和 Claude 的命令参数能力也可短时复用;每次实际重新识别目录时仍核对当前凭据、有效期和远端权限,不缓存远端额度。Windows 后台查询及嵌入式账号终端的启动器隐藏额外控制台窗口。
|
|
127
|
+
|
|
128
|
+
Windows 的设置首次加载、刷新与模型/强度自动保存继续执行必要的账号和目录校验。已核验的 Codex npm 0.162.1 启动脚本在后台直接使用同安装的原生 CLI,避免脚本内部再次启动程序时弹出终端;保留原安装路径、包管理器环境和进程清理。其他脚本版本保留原启动方式,具体窗口验证范围见 [实际验证记录](doc/tasks.md)。
|
|
129
|
+
|
|
130
|
+
Windows 的 Antigravity 后台模型查询及任务使用官方环境开关关闭本次进程的自动更新,避免更新程序另开终端。该开关只作用于插件后台子进程,用户正常打开的 Antigravity 终端仍按原方式更新;macOS 行为不变。
|
|
122
131
|
|
|
123
132
|
成功且进程退出已确认的扩展 CLI 模型查询会自动删除本次临时目录和原生解压缓存;失败或清理未确认时保留现场,不删除原始账号文件。
|
|
124
133
|
|
|
125
134
|
专项记录:[ZCode](doc/zcode-probe.md) · [Grok](doc/grok-probe.md) · [Pi / OMP](doc/pi-omp-probe.md) · [Hermes](doc/hermes-probe.md) · [OpenCode](doc/opencode-probe.md)
|
|
126
135
|
|
|
136
|
+
### Claude Code 与 CC Switch
|
|
137
|
+
|
|
138
|
+
macOS 与 Windows 均读取 Claude Code 自身的当前配置。关闭 CC Switch 路由后,可在插件账号区登录 Claude 官方账号;打开路由后,刷新 Claude 模型列表并选择路由模型。登录和退出官方账号保留 CC Switch 配置。
|
|
139
|
+
|
|
140
|
+
支持 Fable 等原生模型映射及 `[1m]` 上下文后缀,执行时保留准确模型标识。网关未提供模型目录时,仅显示该路由明确配置的模型,并说明远端可用性尚未核验;认证拒绝或查询异常不会切换官方账号。切换路由或映射后重新选择模型,旧任务若来源变更需新建。
|
|
141
|
+
|
|
127
142
|
## 5. 安装与更新
|
|
128
143
|
|
|
129
144
|
### 5.1 一行安装
|
|
130
145
|
|
|
131
146
|
```sh
|
|
132
|
-
dsh plugin --profile desktop add dsh-cliworker-now@
|
|
147
|
+
dsh plugin --profile desktop add dsh-cliworker-now@latest
|
|
133
148
|
```
|
|
134
149
|
|
|
135
150
|
<details>
|
|
@@ -138,15 +153,15 @@ dsh plugin --profile desktop add dsh-cliworker-now@0.7.7
|
|
|
138
153
|
使用 Web profile 时:
|
|
139
154
|
|
|
140
155
|
```sh
|
|
141
|
-
dsh plugin --profile web add dsh-cliworker-now@
|
|
156
|
+
dsh plugin --profile web add dsh-cliworker-now@latest
|
|
142
157
|
```
|
|
143
158
|
|
|
144
|
-
安装或更新前先结束活动任务并完整退出 Harness,完成后重新打开。npm 包已预构建,无需手动解压或编译。也可以在插件页“添加插件”中输入 `dsh-cliworker-now@
|
|
159
|
+
安装或更新前先结束活动任务并完整退出 Harness,完成后重新打开。 每次执行带 `@latest` 的命令,都会安装或更新到 npm 的 latest 标签指向的版本;启动 Harness 本身不会自动更新插件。npm 包已预构建,无需手动解压或编译。也可以在插件页“添加插件”中输入 `dsh-cliworker-now@latest`。
|
|
145
160
|
|
|
146
161
|
GitHub Release 备用安装:
|
|
147
162
|
|
|
148
163
|
```sh
|
|
149
|
-
dsh plugin --profile desktop add https://github.com/SuperWheel/cliworker-now/releases/download/v0.7.
|
|
164
|
+
dsh plugin --profile desktop add https://github.com/SuperWheel/cliworker-now/releases/download/v0.7.8/dsh-cliworker-now-0.7.8.tgz
|
|
150
165
|
```
|
|
151
166
|
|
|
152
167
|
从源码开发:
|
|
@@ -200,7 +215,7 @@ dsh plugin --profile desktop remove dsh-cliworker-now
|
|
|
200
215
|
|
|
201
216
|
明确调用 CLI 时,当前请求会携带对应 CLI 的派遣指引:直接调用 `cliworker_start` 打开选型,模型、强度和角色由插件收集,选型完成后才启动任务。每次工具调用必须显式传入 `cli`(Antigravity 也一样);漏传会返回参数错误,不会采用上次调用或默认 CLI。主模型无需预先提问角色或确认启动;通用提问工具保持不变。
|
|
202
217
|
|
|
203
|
-
全部 11 个 CLI 只使用自身原生登录,或在该 CLI 自己的配置/私有 `.env` 中单独设置的 API Key
|
|
218
|
+
全部 11 个 CLI 只使用自身原生登录,或在该 CLI 自己的配置/私有 `.env` 中单独设置的 API Key。模型与强度按“本 CLI 支持”与“当前自身账号可用范围”筛选;Claude 自身显式网关配置按第 4 节的专门规则展示候选,并说明远端可用性未核验。公共目录、旧缓存、固定别名和匿名免费模型不能单独成为可选依据;未满足上述证据条件时显示空列表及简短原因。账号范围使用只读模型查询,不通过生成请求试探权限。
|
|
204
219
|
|
|
205
220
|
设置、模型菜单和任务卡片只显示模型名称,删除服务商、组织路径前缀及括号附注;同一原生模型去重,不同原生模型同名时仍保留独立选项,保存和执行使用完整路由 ID。新选择优先有明确证据且可用的免费额度,缺省零成本和价格未知不当免费。有效的既有选择保持不变,首次使用仍须由你选型,免费路由失败也不会自动转为付费请求。
|
|
206
221
|
|
|
@@ -212,6 +227,14 @@ OMP、Pi、Hermes 和 OpenCode 的账号行按自身认证显示服务商及方
|
|
|
212
227
|
|
|
213
228
|
OMP、Pi 和 Hermes 的“退出”使用统一按钮并打开各自原生退出菜单。多个自身账号目录先选择来源;操作针对所选真实来源,其他来源保留。Pi/OMP 原生退出不能删除的 `.env` 或模型配置内 API,需在原配置中管理。Hermes 原生写入的停用来源会同步约束登录、模型和调用,不从保留的配置值恢复账号。
|
|
214
229
|
|
|
230
|
+
Windows 的 ZCode 和 OpenCode 还会通过已知默认目录、当前用户及系统安装登记、已运行的对应程序位置,以及开始菜单和桌面快捷方式发现自定义安装目录,支持非系统盘、中文和空格路径。ZCode 核验 `resources/glm/zcode.cjs` 及配套 provider 文件;OpenCode 桌面安装采用实际存在的独立 `opencode-cli.exe`,桌面版本未附 CLI 时会明确提示。已有显式路径、ZCode 已部署运行时和正常 PATH 入口优先;多个不同可用安装需通过 `zcodeExecutable` / `opencodeExecutable` 指定。`DisplayIcon` 是安装注册表中的程序/图标文件路径,不要求桌面上存在图标或快捷方式。任意位置的便携目录若没有安装登记、快捷方式或 PATH,且程序未运行,仍需显式配置;发现安装位置不代表已登录或模型可用。
|
|
231
|
+
|
|
232
|
+
Desktop 中按磁盘实际文件识别安装,兼容 Electron 对 ASAR 归档的处理;OpenCode 的正常 npm CLI 不要求旁侧存在桌面归档。无需重装 CLI 或重新配置账号。
|
|
233
|
+
|
|
234
|
+
每个 CLI 设置页的独立“高级设置”默认折叠,通过右侧箭头展开后可管理 CLI 路径。首次成功识别会将路径保存到本机,后续优先复用;也可输入完整文件路径并点击“刷新”,同步更新 CLI 状态,或“恢复自动识别”。这项设置跨项目共用,但按机器和操作系统隔离。手动路径优先于部署配置,部署配置优先于自动记录;自动记录文件消失后重新识别,手动路径失效则保留并提示,不会静默换用另一个安装。请填写 CLI 文件路径,不要填写桌面 GUI、目录、命令参数或外层引号。
|
|
235
|
+
|
|
236
|
+
设置页的标题、标签、留白、分隔线和控件遵循[统一设计规范](doc/settings-ui-design.md),后续扩展复用同一套参数。
|
|
237
|
+
|
|
215
238
|
ZCode 登录前可选择“中国智谱 BigModel”或“海外 Z.AI”,Mac 和 Windows 使用同一入口;只启动所选来源的官方授权。完整 CLI 的 `login [zai|bigmodel]` 能力与部分 Desktop 内置旧 CLI 不同,仅有 Z.AI 的旧版本选择 BigModel 时会提示升级,不会改开海外页面。插件优先使用 `~/.local/share/cliworker-now/runtimes/zcode/cli/zcode.cjs` 中已部署的完整 CLI,显式配置的执行路径优先级更高;Windows 安装需对应平台的原生依赖。升级 CLI 不会自动迁移 ZCode Desktop 账号,登录继续写入插件独立的 ZCode 账号目录。
|
|
216
239
|
|
|
217
240
|
Windows 的原生授权网址会完整打开一次,也可在终端中点击或选择复制;网页打开不代表授权已完成,需按官方网页提示完成登录。
|
package/lib/account-models.mjs
CHANGED
|
@@ -18,6 +18,7 @@ const unavailable = (model) =>
|
|
|
18
18
|
model.disabled === true ||
|
|
19
19
|
model.upgrade_required === true ||
|
|
20
20
|
model.visibility === 'hidden' ||
|
|
21
|
+
model.visibility === 'hide' ||
|
|
21
22
|
model.visibility === 'none'
|
|
22
23
|
const numericRate = (value) =>
|
|
23
24
|
typeof value === 'number'
|
|
@@ -60,6 +61,7 @@ function normalize(payload, oauth, token) {
|
|
|
60
61
|
if (!list) return undefined
|
|
61
62
|
const result = new Map()
|
|
62
63
|
for (const model of list) {
|
|
64
|
+
// Availability NUX is informational text, not an account denial.
|
|
63
65
|
if (!object(model) || unavailable(model)) continue
|
|
64
66
|
const id = model.slug ?? model.id
|
|
65
67
|
if (
|
|
@@ -70,6 +72,14 @@ function normalize(payload, oauth, token) {
|
|
|
70
72
|
)
|
|
71
73
|
continue
|
|
72
74
|
const name = model.display_name ?? model.name
|
|
75
|
+
const reasoningEfforts =
|
|
76
|
+
oauth && Array.isArray(model.supported_reasoning_levels)
|
|
77
|
+
? [...new Set(model.supported_reasoning_levels.flatMap((level) =>
|
|
78
|
+
object(level) && typeof level.effort === 'string' && /^[a-z]+$/.test(level.effort)
|
|
79
|
+
? [level.effort]
|
|
80
|
+
: [],
|
|
81
|
+
))]
|
|
82
|
+
: []
|
|
73
83
|
result.set(id, {
|
|
74
84
|
id,
|
|
75
85
|
...(typeof name === 'string' &&
|
|
@@ -80,6 +90,7 @@ function normalize(payload, oauth, token) {
|
|
|
80
90
|
? { name }
|
|
81
91
|
: {}),
|
|
82
92
|
cost: costFor(model, oauth),
|
|
93
|
+
...(reasoningEfforts.length ? { reasoningEfforts } : {}),
|
|
83
94
|
})
|
|
84
95
|
}
|
|
85
96
|
return [...result.values()]
|
|
@@ -131,6 +142,15 @@ export async function probeAccountModels(input, options = {}) {
|
|
|
131
142
|
if (oauth && (typeof credential.expires !== 'number' || credential.expires <= Date.now() + 30000))
|
|
132
143
|
return denied('authentication')
|
|
133
144
|
const codex = oauth && ['openai', 'openai-codex'].includes(input.provider)
|
|
145
|
+
if (
|
|
146
|
+
input.codexClientVersion !== undefined &&
|
|
147
|
+
(typeof input.codexClientVersion !== 'string' || input.codexClientVersion.length > 64 ||
|
|
148
|
+
!/^\d+\.\d+\.\d+(?:[-+][A-Za-z0-9.-]+)?$/.test(input.codexClientVersion))
|
|
149
|
+
)
|
|
150
|
+
return unknown()
|
|
151
|
+
// Other native client integrations retain their existing compatibility query.
|
|
152
|
+
// discoverCodexModels always requires and supplies its own handshake version.
|
|
153
|
+
const codexVersion = input.codexClientVersion ?? '0.144.1'
|
|
134
154
|
// xAI/other subscription catalogs do not expose a verified per-account scope
|
|
135
155
|
// contract here. Do not turn an OAuth login into their whole public catalog.
|
|
136
156
|
if (oauth && !codex) return unknown()
|
|
@@ -162,12 +182,12 @@ export async function probeAccountModels(input, options = {}) {
|
|
|
162
182
|
}
|
|
163
183
|
if (typeof accountId === 'string' && accountId) headers['chatgpt-account-id'] = accountId
|
|
164
184
|
headers['OpenAI-Beta'] = 'responses=experimental'
|
|
165
|
-
headers.originator = 'pi'
|
|
166
|
-
headers.version =
|
|
185
|
+
headers.originator = input.codexClientVersion ? 'cli_worker_models' : 'pi'
|
|
186
|
+
headers.version = codexVersion
|
|
167
187
|
}
|
|
168
188
|
const fetcher = options.fetch ?? globalThis.fetch
|
|
169
189
|
const request = async (path) => {
|
|
170
|
-
const target = `${base}${path}${codex && path !== '/wham/usage' ?
|
|
190
|
+
const target = `${base}${path}${codex && path !== '/wham/usage' ? `?client_version=${encodeURIComponent(codexVersion)}` : ''}`
|
|
171
191
|
const response = await fetcher(target, { method: 'GET', headers, signal, redirect: 'error' })
|
|
172
192
|
if (!response.ok) {
|
|
173
193
|
await response.body?.cancel()
|
|
@@ -239,7 +259,12 @@ export async function probeAccountModels(input, options = {}) {
|
|
|
239
259
|
) {
|
|
240
260
|
for (const model of models) if (model.cost === 'free') model.cost = 'unknown'
|
|
241
261
|
}
|
|
242
|
-
return {
|
|
262
|
+
return {
|
|
263
|
+
state: 'supported',
|
|
264
|
+
source: 'account-models',
|
|
265
|
+
models,
|
|
266
|
+
...(!codex && entries(envelope)?.length === 0 ? { catalogEmpty: true } : {}),
|
|
267
|
+
}
|
|
243
268
|
}
|
|
244
269
|
if (!oauth && [404, 405].includes(modelResponse?.status)) {
|
|
245
270
|
// Declaring a custom model is not an account entitlement proof.
|
|
@@ -253,7 +278,10 @@ export async function probeAccountModels(input, options = {}) {
|
|
|
253
278
|
models: verified.map((id) => ({ id, cost: 'unknown' })),
|
|
254
279
|
}
|
|
255
280
|
}
|
|
256
|
-
return
|
|
281
|
+
return {
|
|
282
|
+
...unknown(),
|
|
283
|
+
...([404, 405].includes(modelResponse?.status) ? { catalogUnavailable: true } : {}),
|
|
284
|
+
}
|
|
257
285
|
} catch {
|
|
258
286
|
return unknown()
|
|
259
287
|
} finally {
|