dsh-cliworker-now 0.7.6 → 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 +53 -11
- package/README.md +56 -11
- package/lib/account-models.mjs +49 -18
- package/lib/client.js +1221 -151
- package/lib/client.js.map +1 -1
- package/lib/grok-catalog.mjs +2 -2
- package/lib/hermes-native-entry.py +48 -13
- package/lib/hermes-nous-refresh.py +331 -0
- package/lib/index.js +9469 -6030
- package/lib/index.js.map +1 -1
- package/lib/native-launch.mjs +62 -7
- package/lib/native-spawn.mjs +32 -0
- package/lib/pi-installation.mjs +27 -3
- package/lib/pi-native-catalog.mjs +17 -7
- package/lib/pi-omp-bridge.mjs +2 -2
- package/lib/pi-omp-refresh.mjs +3 -3
- package/lib/private-launch.mjs +6 -2
- package/lib/terminal-bridge.mjs +2 -2
- package/lib/typert.host.js +265 -25
- package/lib/typert.remote-client.d.ts +8 -0
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +241 -25
- package/lib/types/client/account-query-queue.d.ts +16 -0
- package/lib/types/client/account-query-queue.js +61 -0
- package/lib/types/client/account-query-queue.js.map +1 -0
- package/lib/types/client/account-terminal.d.ts +6 -2
- package/lib/types/client/account-terminal.js +260 -31
- package/lib/types/client/account-terminal.js.map +1 -1
- 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 +196 -80
- 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/client/zcode-login-link-provider.d.ts +9 -0
- package/lib/types/client/zcode-login-link-provider.js +105 -0
- package/lib/types/client/zcode-login-link-provider.js.map +1 -0
- package/lib/types/client/zcode-login-link.d.ts +16 -0
- package/lib/types/client/zcode-login-link.js +194 -0
- package/lib/types/client/zcode-login-link.js.map +1 -0
- package/lib/types/host/account-models.d.mts +10 -2
- package/lib/types/host/account-models.mjs +49 -18
- package/lib/types/host/accounts.d.ts +3 -2
- package/lib/types/host/accounts.js +168 -29
- package/lib/types/host/accounts.js.map +1 -1
- package/lib/types/host/adapters.d.ts +3 -1
- package/lib/types/host/adapters.js +138 -11
- 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/agy-models.d.ts +2 -1
- package/lib/types/host/agy-models.js +6 -6
- package/lib/types/host/agy-models.js.map +1 -1
- package/lib/types/host/agy-windows-account.d.ts +14 -0
- package/lib/types/host/agy-windows-account.js +104 -0
- package/lib/types/host/agy-windows-account.js.map +1 -0
- package/lib/types/host/authorized-catalog.js +13 -4
- package/lib/types/host/authorized-catalog.js.map +1 -1
- package/lib/types/host/claude-native-oauth.d.ts +17 -0
- package/lib/types/host/claude-native-oauth.js +274 -0
- package/lib/types/host/claude-native-oauth.js.map +1 -0
- package/lib/types/host/claude-own-route.d.ts +45 -0
- package/lib/types/host/claude-own-route.js +375 -0
- package/lib/types/host/claude-own-route.js.map +1 -0
- package/lib/types/host/cli-account-binding.d.ts +2 -1
- package/lib/types/host/cli-account-binding.js +64 -21
- 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 +41 -4
- package/lib/types/host/codex-models.js.map +1 -1
- package/lib/types/host/extended-adapters.d.ts +3 -2
- package/lib/types/host/extended-adapters.js +9 -7
- package/lib/types/host/extended-adapters.js.map +1 -1
- package/lib/types/host/first-party-models.d.ts +5 -0
- package/lib/types/host/first-party-models.js +173 -50
- package/lib/types/host/first-party-models.js.map +1 -1
- package/lib/types/host/hermes-accounts.js +68 -9
- package/lib/types/host/hermes-accounts.js.map +1 -1
- package/lib/types/host/hermes-adapter.d.ts +3 -0
- package/lib/types/host/hermes-adapter.js +13 -4
- package/lib/types/host/hermes-adapter.js.map +1 -1
- package/lib/types/host/hermes-installation.js +54 -35
- package/lib/types/host/hermes-installation.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/hermes-native-entry.py +48 -13
- package/lib/types/host/hermes-nous-refresh.py +331 -0
- package/lib/types/host/hermes-nous.d.ts +5 -1
- package/lib/types/host/hermes-nous.js +5 -5
- package/lib/types/host/hermes-nous.js.map +1 -1
- package/lib/types/host/hermes-renewal.d.ts +27 -0
- package/lib/types/host/hermes-renewal.js +292 -0
- package/lib/types/host/hermes-renewal.js.map +1 -0
- package/lib/types/host/hermes-windows-installation.d.ts +5 -0
- package/lib/types/host/hermes-windows-installation.js +91 -0
- package/lib/types/host/hermes-windows-installation.js.map +1 -0
- package/lib/types/host/index.d.ts +12 -0
- package/lib/types/host/index.js +138 -8
- package/lib/types/host/index.js.map +1 -1
- package/lib/types/host/kimi-accounts.d.ts +2 -0
- package/lib/types/host/kimi-accounts.js +4 -2
- package/lib/types/host/kimi-accounts.js.map +1 -1
- package/lib/types/host/kimi-oauth-models.d.ts +14 -0
- package/lib/types/host/kimi-oauth-models.js +246 -0
- package/lib/types/host/kimi-oauth-models.js.map +1 -0
- package/lib/types/host/mimo-metadata-cache.d.ts +22 -0
- package/lib/types/host/mimo-metadata-cache.js +121 -0
- package/lib/types/host/mimo-metadata-cache.js.map +1 -0
- package/lib/types/host/native-capability-cache.d.ts +11 -0
- package/lib/types/host/native-capability-cache.js +94 -0
- package/lib/types/host/native-capability-cache.js.map +1 -0
- package/lib/types/host/native-launch.mjs +62 -7
- package/lib/types/host/native-process.d.ts +3 -1
- package/lib/types/host/native-process.js +30 -5
- package/lib/types/host/native-process.js.map +1 -1
- package/lib/types/host/native-spawn.mjs +32 -0
- package/lib/types/host/opencode-native.js +13 -0
- package/lib/types/host/opencode-native.js.map +1 -1
- package/lib/types/host/pi-installation.d.mts +1 -1
- package/lib/types/host/pi-installation.mjs +27 -3
- package/lib/types/host/pi-omp-adapter.js +17 -3
- 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/private-launch.mjs +23 -0
- 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/routing.js +25 -2
- package/lib/types/host/routing.js.map +1 -1
- package/lib/types/host/runtime.js +21 -5
- 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-account-bootstrap.ps1 +44 -0
- package/lib/types/host/windows-account-launch.mjs +47 -0
- package/lib/types/host/windows-account-owner.ps1 +137 -0
- package/lib/types/host/windows-account-stdio.mjs +19 -0
- package/lib/types/host/windows-account-terminal.d.ts +17 -0
- package/lib/types/host/windows-account-terminal.js +208 -0
- package/lib/types/host/windows-account-terminal.js.map +1 -0
- package/lib/types/host/windows-agy-account.ps1 +81 -0
- package/lib/types/host/windows-cli-installation.d.ts +35 -0
- package/lib/types/host/windows-cli-installation.js +164 -0
- package/lib/types/host/windows-cli-installation.js.map +1 -0
- 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 +51 -0
- package/lib/types/host/windows-hidden-process.d.ts +12 -0
- package/lib/types/host/windows-hidden-process.js +116 -0
- package/lib/types/host/windows-hidden-process.js.map +1 -0
- package/lib/types/host/zcode-adapter.js +5 -1
- package/lib/types/host/zcode-adapter.js.map +1 -1
- package/lib/types/host/zcode-grok-accounts.d.ts +3 -1
- package/lib/types/host/zcode-grok-accounts.js +60 -11
- package/lib/types/host/zcode-grok-accounts.js.map +1 -1
- package/lib/types/shared/accounts.d.ts +4 -0
- package/lib/types/shared/cli-settings.d.ts +8 -0
- package/lib/windows-account-bootstrap.ps1 +44 -0
- package/lib/windows-account-launch.mjs +47 -0
- package/lib/windows-account-owner.ps1 +137 -0
- package/lib/windows-account-stdio.mjs +19 -0
- package/lib/windows-agy-account.ps1 +81 -0
- package/lib/windows-hidden-launch.mjs +51 -0
- package/lib/zcode-resume.mjs +2 -2
- 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
|
|
|
@@ -107,20 +111,38 @@ An integrated adapter does not mean every model, subscription or platform has be
|
|
|
107
111
|
| ZCode | 0.16.9 | Native authentication, headless execution and session protocol integrated; see its probe record |
|
|
108
112
|
| Grok Build | 1.0.0 | Own login, official Build access permission and model directory checked separately; generation remains unverified |
|
|
109
113
|
| OMP | 16.4.4 | Native login/logout menus and own log-write permissions checked; RPC integrated; Zhipu Coding CN GLM-5.3-Flash was tested historically |
|
|
110
|
-
| Pi | 1.0.2 / 1.0.4 | Executable identity and SDK/RPC checked by version; 1.0.2 with Zhipu Coding CN GLM-5.3-Flash was tested historically; 1.0.4 checks were read-only or offline |
|
|
114
|
+
| Pi | 1.0.2 / 1.0.4 / 1.1.0 | Executable identity and SDK/RPC checked by version; 1.0.2 with Zhipu Coding CN GLM-5.3-Flash was tested historically; 1.0.4 checks were read-only or offline; 1.1.0 passed credential-free SDK/RPC, native login menu display and termination cleanup on Windows, with live login and model execution still unverified |
|
|
111
115
|
| Hermes Agent | Installed checkout 6c80c32734 | Own account directory, native account menus and Nous model access checked; a read-only check returned 10 free models; generation and continuation remain unverified |
|
|
112
116
|
| OpenCode | 1.18.21 | Native model directory and JSONL adapter integrated; Zhipu models were tested historically; a free MiMo request previously returned HTTP 403 |
|
|
113
117
|
|
|
114
118
|
MiMo refers to [XiaomiMiMo/MiMo-Code](https://github.com/XiaomiMiMo/MiMo-Code). Hermes Agent replaced the old external Harness CLI adapter; DeepSeek Harness remains the plugin's host.
|
|
115
119
|
|
|
120
|
+
MiMo reuses a bounded, short-lived in-memory cache of native capabilities to reduce repeated CLI startup on Windows. The first load still queries the native CLI. Changes to the account, configuration, project or executable invalidate the cache, and each dispatch still checks the current account's access.
|
|
121
|
+
|
|
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.
|
|
123
|
+
|
|
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.
|
|
129
|
+
|
|
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.
|
|
131
|
+
|
|
116
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)
|
|
117
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
|
+
|
|
118
140
|
## 5. Installation and updates
|
|
119
141
|
|
|
120
142
|
### 5.1 One-line install
|
|
121
143
|
|
|
122
144
|
```sh
|
|
123
|
-
dsh plugin --profile desktop add dsh-cliworker-now@
|
|
145
|
+
dsh plugin --profile desktop add dsh-cliworker-now@latest
|
|
124
146
|
```
|
|
125
147
|
|
|
126
148
|
<details>
|
|
@@ -129,15 +151,15 @@ dsh plugin --profile desktop add dsh-cliworker-now@0.7.6
|
|
|
129
151
|
For the Web profile:
|
|
130
152
|
|
|
131
153
|
```sh
|
|
132
|
-
dsh plugin --profile web add dsh-cliworker-now@
|
|
154
|
+
dsh plugin --profile web add dsh-cliworker-now@latest
|
|
133
155
|
```
|
|
134
156
|
|
|
135
|
-
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.
|
|
136
158
|
|
|
137
159
|
GitHub Release fallback:
|
|
138
160
|
|
|
139
161
|
```sh
|
|
140
|
-
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
|
|
141
163
|
```
|
|
142
164
|
|
|
143
165
|
For source development:
|
|
@@ -174,7 +196,7 @@ Short aliases are also supported:
|
|
|
174
196
|
>
|
|
175
197
|
> Use glm CLI to check this code.
|
|
176
198
|
|
|
177
|
-
`agy` maps to **Antigravity**, `glm / zhipu / 智谱` to **ZCode**, and `harmes` to **Hermes Agent**. Explicit requests receive a routing hint, and dispatch tools resolve these aliases consistently. A small spelling error in a longer name is accepted only with one unambiguous match. Unknown names or multiple targets return a short error with candidates and do not start a task. Ordinary model discussion, negated requests and quoted examples do not trigger a routing hint. Harness's main model still decides whether to invoke the tool; if needed, explicitly ask it to “use the CLI Worker plugin to call agy CLI”.
|
|
199
|
+
`agy` maps to **Antigravity**, `glm / zhipu / 智谱` to **ZCode**, and `harmes` to **Hermes Agent**. Explicit requests receive a routing hint, and dispatch tools resolve these aliases consistently. Matching parenthesized aliases such as `Antigravity (agy) CLI` and repeated requests for the same CLI resolve to one target. A small spelling error in a longer name is accepted only with one unambiguous match. Unknown names or multiple targets return a short error with candidates and do not start a task. Ordinary model discussion, negated requests and quoted examples do not trigger a routing hint. Harness's main model still decides whether to invoke the tool; if needed, explicitly ask it to “use the CLI Worker plugin to call agy CLI”.
|
|
178
200
|
|
|
179
201
|
The first use of a project and CLI opens a native Harness question card for:
|
|
180
202
|
|
|
@@ -191,12 +213,28 @@ Later invocations in the same main conversation use its confirmed setup, includi
|
|
|
191
213
|
|
|
192
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.
|
|
193
215
|
|
|
194
|
-
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.
|
|
195
217
|
|
|
196
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.
|
|
197
219
|
|
|
198
220
|
**OMP (Oh My Pi) and Pi Coding Agent are separate CLIs.** Their installations, accounts, models and sessions are managed independently. The plugin checks executable identity and does not silently replace an installation with another version.
|
|
199
221
|
|
|
222
|
+
macOS and Windows share the same account terminal with text selection and copying, Cmd+V / Ctrl+V paste and a blinking block cursor. Right-click copies selected text, or pastes when nothing is selected. Login opens the native authorization page directly; the complete Windows ZCode login URL is also clickable and can be selected and copied into a browser.
|
|
223
|
+
|
|
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.
|
|
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
|
+
|
|
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.
|
|
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
|
+
|
|
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.
|
|
237
|
+
|
|
200
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.
|
|
201
239
|
|
|
202
240
|
OMP, Pi and Hermes use the same logout button and open their own native logout menus. If more than one own account directory exists, choose the source first. The operation targets that source and preserves others. API keys in Pi/OMP `.env` or model configuration must be managed in their original configuration when native logout cannot remove them. Hermes's native disabled-source state also governs login, model discovery and execution.
|
|
@@ -207,10 +245,12 @@ Some account modes have additional boundaries:
|
|
|
207
245
|
|
|
208
246
|
- **Antigravity:** uses its own native login and live `agy models` directory, including native effort variants. A slow or failed model query does not turn a logged-in account into “not logged in”. Duplicate in-flight account reads are combined; refresh and execution still read current authentication.
|
|
209
247
|
- **Codex:** supports checked official file-based accounts. Keyring accounts or custom routes remain unavailable when account scope cannot be established.
|
|
210
|
-
- **Claude
|
|
211
|
-
- **
|
|
248
|
+
- **Claude:** the active source is displayed. A reachable own local proxy is used; when it is offline, the native official account is selected. Proxy authentication or metadata errors do not trigger account fallback. Official login/logout preserves proxy settings, and a worker keeps its selected source throughout execution. Official OAuth models require native account, capability, and remaining-quota evidence.
|
|
249
|
+
- **Kimi and OpenCode:** Kimi native managed OAuth combines its own model aliases, authenticated catalog and confirmed remaining quota. Missing, unknown or exhausted quota asks the user to check the account. Other unverified Kimi OAuth modes remain unavailable. Own API configurations are filtered by account scope. OpenCode OAuth writeback lacks account-version protection, so only its own API configuration is currently enabled for execution.
|
|
250
|
+
- **ZCode:** choose China BigModel or overseas Z.AI before login on either platform. Only the selected native flow starts. A complete CLI with `login [zai|bigmodel]` is required for both providers; older Desktop bundles that only support Z.AI reject a BigModel selection with an upgrade message. A deployed `~/.local/share/cliworker-now/runtimes/zcode/cli/zcode.cjs` takes precedence over the bundled default on both platforms; explicit executable configuration still takes precedence. Windows requires its own native dependencies. Desktop credentials are not migrated; login uses the plugin's separate ZCode account directory. Windows opens the complete native authorization URL once, with clickable/selectable terminal text for recovery; opening a page alone does not complete authentication.
|
|
251
|
+
- **MiMo:** repeated local capability queries use a bounded in-memory cache to avoid repeated CLI startup on Windows. Initial reads still query the native CLI. Account, configuration, project and executable changes invalidate the cache; each dispatch still verifies current authorization. Its native browser login writes own API authentication, including the official service address. Only verifiable local configuration is accepted; file/environment interpolation or remote organization configuration must first be removed.
|
|
212
252
|
- **Kimi identity:** a valid or renewable native login displays “logged in” and a confirmed shortened account ID. Email addresses or names are not invented when the native account does not store them. “Manage login” opens the native terminal; enter `/logout` and then `/login` to switch accounts. It starts in an empty directory without project MCP configuration. Native trust prompts remain user decisions. Provider configuration without a token does not count as a login.
|
|
213
|
-
- **Hermes:** explicitly opening login settings establishes its isolated native account directory inside the plugin. Status, models and tasks then remain bound to it; logout does not fall back to an older global account. Host account discovery excludes credentials borrowed from other CLIs and never injects Harness authentication. The native process follows its own permissions. Nous models come from the authenticated official directory and access permissions; only confirmed free models are offered without paid access.
|
|
253
|
+
- **Hermes:** explicitly opening login settings establishes its isolated native account directory inside the plugin. Status, models and tasks then remain bound to it; logout does not fall back to an older global account. Host account discovery excludes credentials borrowed from other CLIs and never injects Harness authentication. The native process follows its own permissions. Nous models come from the authenticated official directory and access permissions; only confirmed free models are offered without paid access. Mac and Windows share native renewal for expired or soon-to-expire access tokens from the same account. Healthy tokens require no extra process. Temporary network failures allow retry; missing or explicitly invalid refresh credentials require login. Renewal does not generate, switch accounts, clear quota/cooldown restrictions, or restore a logged-out account from an old snapshot.
|
|
214
254
|
- **Grok:** checks the official Build access gate before matching the authenticated directory with native models and efforts. Login, an HTTP 200 catalog response or subscription status alone does not establish execution permission. Unknown or denied access leaves the model list empty with a short reason.
|
|
215
255
|
|
|
216
256
|
```mermaid
|
|
@@ -314,6 +354,8 @@ pnpm --config.verify-deps-before-run=false build:preview
|
|
|
314
354
|
|
|
315
355
|
The isolated package is written to `.cache/preview-package`. Verify it in a separate profile first, then check that no tasks are active before the production build, so development does not overwrite the version used by an active Desktop session.
|
|
316
356
|
|
|
357
|
+
After building on Mac, use SSH to install isolated native dependencies and run targeted regressions on your own Windows machine, then return logs and package hashes. See the [Windows remote testing guide](doc/windows-remote-testing.md) (Chinese). Run `pnpm --config.verifyDepsBeforeRun=false test:windows:remote --config .test-data/windows-remote/config.json`; the default workflow makes no model requests and does not verify the Desktop UI.
|
|
358
|
+
|
|
317
359
|
Live CLI acceptance is separate and uses the selected account's model allowance:
|
|
318
360
|
|
|
319
361
|
```sh
|
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,11 @@ 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 的设置会重新识别并保存模型与思考强度的可选列表;本次运行再次打开时自动填入已核验列表。重启后重新识别,只有内容变化才更新缓存。已选默认值仍有效时保留,失效则提示重新选择;也可点击刷新模型主动重查。
|
|
79
|
+
|
|
80
|
+
macOS 与 Windows 共用同一账号终端,支持选择文字复制及 Cmd+V/Ctrl+V 粘贴;右键在有选区时复制、无选区时粘贴,输入位置使用闪烁块状光标。登录时直接打开原生授权网页;Windows ZCode 的完整登录网址也可在终端点击或选择复制到浏览器。
|
|
74
81
|
|
|
75
82
|

|
|
76
83
|
|
|
@@ -106,20 +113,38 @@ CLI Worker Now 是 **DeepSeek Harness 的独立多 CLI 智能体插件**。它
|
|
|
106
113
|
| ZCode | 0.16.9 | 原生登录、headless 与会话协议已接入;详见专项记录 |
|
|
107
114
|
| Grok Build | 1.0.0 | 自身登录、官方 Build 访问许可和模型目录分别核对;目录可读不等于有调用权限,真实生成未验收 |
|
|
108
115
|
| OMP | 16.4.4 | 原生登录菜单及自身日志写权限已修复;RPC 接入,历史智谱 Coding CN GLM-5.3-Flash 已实测 |
|
|
109
|
-
| Pi | 1.0.2 / 1.0.4 | 原生安装身份及 SDK/RPC 按版本核验;1.0.2 的智谱 Coding CN GLM-5.3-Flash 曾实测,1.0.4
|
|
116
|
+
| Pi | 1.0.2 / 1.0.4 / 1.1.0 | 原生安装身份及 SDK/RPC 按版本核验;1.0.2 的智谱 Coding CN GLM-5.3-Flash 曾实测,1.0.4 仅只读/离线核验;1.1.0 在 Windows 通过无凭据 SDK/RPC、原生登录菜单显示及终止清理验证,尚未完成真实登录与模型调用 |
|
|
110
117
|
| Hermes Agent | 当前安装 checkout 6c80c32734 | 独立自身账号目录、原生登录菜单及 Nous 自身账号目录已验收;只读确认 10 个免费模型,真实生成与续聊未验收 |
|
|
111
118
|
| OpenCode | 1.18.21 | 原生目录与 JSONL 接入;智谱模型已实测,免费 MiMo 请求曾返回 403 |
|
|
112
119
|
|
|
113
120
|
MiMo 指 [XiaomiMiMo/MiMo-Code](https://github.com/XiaomiMiMo/MiMo-Code)。Hermes Agent 替代的是旧的外部 Harness CLI 入口,**DeepSeek Harness 宿主仍是插件的运行基础**。
|
|
114
121
|
|
|
122
|
+
MiMo 短时间重复加载模型能力时复用有界内存缓存,减少 Windows 上反复启动 CLI 的等待。首次加载仍需查询原生 CLI;账号、配置、项目或程序变化使缓存失效,每次派遣仍核对当前账号授权。
|
|
123
|
+
|
|
124
|
+
设置页的账号状态请求最多两个并发,包含当前选中的 CLI。首次打开优先当前项,切换时只调整待排顺序;模型目录另行查询,因此这不是全部子进程的数量上限。关闭或禁用会取消对应读取,底层进程清理仍由 Host 管理。
|
|
125
|
+
|
|
126
|
+
Kimi 已核验的 managed OAuth 模型能力和 Claude 的命令参数能力也可短时复用;每次实际重新识别目录时仍核对当前凭据、有效期和远端权限,不缓存远端额度。Windows 后台查询及嵌入式账号终端的启动器隐藏额外控制台窗口。
|
|
127
|
+
|
|
128
|
+
Windows 的设置首次加载、刷新与模型/强度自动保存继续执行必要的账号和目录校验。已核验的 Codex npm 0.162.1 启动脚本在后台直接使用同安装的原生 CLI,避免脚本内部再次启动程序时弹出终端;保留原安装路径、包管理器环境和进程清理。其他脚本版本保留原启动方式,具体窗口验证范围见 [实际验证记录](doc/tasks.md)。
|
|
129
|
+
|
|
130
|
+
Windows 的 Antigravity 后台模型查询及任务使用官方环境开关关闭本次进程的自动更新,避免更新程序另开终端。该开关只作用于插件后台子进程,用户正常打开的 Antigravity 终端仍按原方式更新;macOS 行为不变。
|
|
131
|
+
|
|
132
|
+
成功且进程退出已确认的扩展 CLI 模型查询会自动删除本次临时目录和原生解压缓存;失败或清理未确认时保留现场,不删除原始账号文件。
|
|
133
|
+
|
|
115
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)
|
|
116
135
|
|
|
136
|
+
### Claude Code 与 CC Switch
|
|
137
|
+
|
|
138
|
+
macOS 与 Windows 均读取 Claude Code 自身的当前配置。关闭 CC Switch 路由后,可在插件账号区登录 Claude 官方账号;打开路由后,刷新 Claude 模型列表并选择路由模型。登录和退出官方账号保留 CC Switch 配置。
|
|
139
|
+
|
|
140
|
+
支持 Fable 等原生模型映射及 `[1m]` 上下文后缀,执行时保留准确模型标识。网关未提供模型目录时,仅显示该路由明确配置的模型,并说明远端可用性尚未核验;认证拒绝或查询异常不会切换官方账号。切换路由或映射后重新选择模型,旧任务若来源变更需新建。
|
|
141
|
+
|
|
117
142
|
## 5. 安装与更新
|
|
118
143
|
|
|
119
144
|
### 5.1 一行安装
|
|
120
145
|
|
|
121
146
|
```sh
|
|
122
|
-
dsh plugin --profile desktop add dsh-cliworker-now@
|
|
147
|
+
dsh plugin --profile desktop add dsh-cliworker-now@latest
|
|
123
148
|
```
|
|
124
149
|
|
|
125
150
|
<details>
|
|
@@ -128,15 +153,15 @@ dsh plugin --profile desktop add dsh-cliworker-now@0.7.6
|
|
|
128
153
|
使用 Web profile 时:
|
|
129
154
|
|
|
130
155
|
```sh
|
|
131
|
-
dsh plugin --profile web add dsh-cliworker-now@
|
|
156
|
+
dsh plugin --profile web add dsh-cliworker-now@latest
|
|
132
157
|
```
|
|
133
158
|
|
|
134
|
-
安装或更新前先结束活动任务并完整退出 Harness,完成后重新打开。npm 包已预构建,无需手动解压或编译。也可以在插件页“添加插件”中输入 `dsh-cliworker-now@
|
|
159
|
+
安装或更新前先结束活动任务并完整退出 Harness,完成后重新打开。 每次执行带 `@latest` 的命令,都会安装或更新到 npm 的 latest 标签指向的版本;启动 Harness 本身不会自动更新插件。npm 包已预构建,无需手动解压或编译。也可以在插件页“添加插件”中输入 `dsh-cliworker-now@latest`。
|
|
135
160
|
|
|
136
161
|
GitHub Release 备用安装:
|
|
137
162
|
|
|
138
163
|
```sh
|
|
139
|
-
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
|
|
140
165
|
```
|
|
141
166
|
|
|
142
167
|
从源码开发:
|
|
@@ -173,7 +198,7 @@ dsh plugin --profile desktop remove dsh-cliworker-now
|
|
|
173
198
|
>
|
|
174
199
|
> 调用 glm cli 帮我检查这段代码。
|
|
175
200
|
|
|
176
|
-
`agy` 对应 **Antigravity**,`glm / zhipu / 智谱` 对应 **ZCode**,`harmes` 对应 **Hermes Agent
|
|
201
|
+
`agy` 对应 **Antigravity**,`glm / zhipu / 智谱` 对应 **ZCode**,`harmes` 对应 **Hermes Agent**。插件会为当前明确调用提供路由提示,并在派遣工具里统一解析名称;支持 `Antigravity(agy)CLI` 这样的同名别名,重复指定同一 CLI 仍视为一个目标。较长名称的轻微拼写误差只有唯一候选时才接受。未知名称或多个目标返回简短错误和候选,不自动派遣,普通模型讨论、否定调用和引用示例不会触发路由提示。是否调用工具仍由 Harness 主模型决定;如果模型忽略请求,可明确说“使用 CLI Worker 插件调用 agy CLI”。
|
|
177
202
|
|
|
178
203
|
首次使用相应项目和 CLI 时,通过 Harness 原生问题卡片选择:
|
|
179
204
|
|
|
@@ -190,27 +215,45 @@ dsh plugin --profile desktop remove dsh-cliworker-now
|
|
|
190
215
|
|
|
191
216
|
明确调用 CLI 时,当前请求会携带对应 CLI 的派遣指引:直接调用 `cliworker_start` 打开选型,模型、强度和角色由插件收集,选型完成后才启动任务。每次工具调用必须显式传入 `cli`(Antigravity 也一样);漏传会返回参数错误,不会采用上次调用或默认 CLI。主模型无需预先提问角色或确认启动;通用提问工具保持不变。
|
|
192
217
|
|
|
193
|
-
全部 11 个 CLI 只使用自身原生登录,或在该 CLI 自己的配置/私有 `.env` 中单独设置的 API Key
|
|
218
|
+
全部 11 个 CLI 只使用自身原生登录,或在该 CLI 自己的配置/私有 `.env` 中单独设置的 API Key。模型与强度按“本 CLI 支持”与“当前自身账号可用范围”筛选;Claude 自身显式网关配置按第 4 节的专门规则展示候选,并说明远端可用性未核验。公共目录、旧缓存、固定别名和匿名免费模型不能单独成为可选依据;未满足上述证据条件时显示空列表及简短原因。账号范围使用只读模型查询,不通过生成请求试探权限。
|
|
194
219
|
|
|
195
220
|
设置、模型菜单和任务卡片只显示模型名称,删除服务商、组织路径前缀及括号附注;同一原生模型去重,不同原生模型同名时仍保留独立选项,保存和执行使用完整路由 ID。新选择优先有明确证据且可用的免费额度,缺省零成本和价格未知不当免费。有效的既有选择保持不变,首次使用仍须由你选型,免费路由失败也不会自动转为付费请求。
|
|
196
221
|
|
|
197
222
|
OMP(Oh My Pi)与 Pi Coding Agent 是两个独立 CLI;安装、账号、模型和会话各自管理,即使使用相同模型也不能互换。插件核验实际执行程序身份;Pi 优先使用已核验的原生安装,不暗中切换到另一旧版。
|
|
198
223
|
|
|
224
|
+
Windows 也能发现当前用户注册的官方 Codex 应用包内 CLI 和官方 npm 固定入口,以及 Hermes 的官方安装目录;只有安装痕迹而没有可执行文件时会提示完成安装。Windows 支持已核验的 Pi 官方固定启动器,以及 OpenCode npm 包声明的原生程序入口。插件静态解析并校验安装身份;无法确认或已损坏的入口会提示检查安装。Pi 其他版本需先核验 SDK/RPC 和原生菜单后接入。
|
|
225
|
+
|
|
199
226
|
OMP、Pi、Hermes 和 OpenCode 的账号行按自身认证显示服务商及方式。有账号登录时简写为“OpenAI账号登录”等,完整安全身份及其他 API 认证保留在悬浮详情;仅 API 时显示“zai.cn API 登录”等。有效认证不会统一降成“已配置”。只有配置声明、缺失或失效凭据保留对应灰/红状态,模型权限仍单独核对。
|
|
200
227
|
|
|
201
228
|
OMP、Pi 和 Hermes 的“退出”使用统一按钮并打开各自原生退出菜单。多个自身账号目录先选择来源;操作针对所选真实来源,其他来源保留。Pi/OMP 原生退出不能删除的 `.env` 或模型配置内 API,需在原配置中管理。Hermes 原生写入的停用来源会同步约束登录、模型和调用,不从保留的配置值恢复账号。
|
|
202
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
|
+
|
|
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 账号目录。
|
|
239
|
+
|
|
240
|
+
Windows 的原生授权网址会完整打开一次,也可在终端中点击或选择复制;网页打开不代表授权已完成,需按官方网页提示完成登录。
|
|
241
|
+
|
|
203
242
|
账号发现和执行绑定同一来源;保存选型、新任务、排队出队和续聊都会重新核对账号、模型与强度。换号或退出会阻止旧任务启动,历史任务换号后需新建任务;升级前未记录账号绑定的历史任务也需新建,原对话保留。插件不读取其他 CLI 的凭据,也不继承 Harness API 凭据;旧 `zaiCredentialRef` 配置兼容读取但不生效。旧派生认证快照会按当前自身来源重建,原生账号、历史会话和偏好保留;失效偏好需重新选择。
|
|
204
243
|
|
|
205
|
-
Antigravity 使用自身原生登录和实时 `agy models`
|
|
244
|
+
Antigravity 使用自身原生登录和实时 `agy models` 目录,只展示原生返回的模型及强度变体。Windows 使用原生 Credential Manager 中当前交互式用户的账号,仅返回安全身份摘要。账号读取先完成,模型查询的等待或失败不会把已登录账号改为未登录。重复的在途账号读取会合并,后续刷新与执行授权仍读取当前账号。
|
|
245
|
+
|
|
246
|
+
Claude 会显示当前来源:自身配置的本地代理可达时使用代理,代理关闭时使用原生官方账号。代理认证或模型查询失败会明确报错,不自动换号。官方登录/退出只作用于官方账号,保留代理设置;任务启动前固定来源,不在运行中切换。官方 OAuth 模型需同时通过原生身份、模型能力和剩余额度核验;缺少证据时不放行。
|
|
206
247
|
|
|
207
|
-
当前账号范围边界:
|
|
248
|
+
当前账号范围边界:Kimi 原生 managed OAuth 使用自身模型别名、认证目录和可确认的套餐额度;额度为空、未知或耗尽时提示检查账号。其他未核验的 Kimi OAuth 模式及 OpenCode OAuth 暂不开放派遣。Claude 自身设置中的 API Key/Bearer Token、Kimi 自身 API 配置、MiMo 原生网页登录写入的自身 API 认证,以及可核对的本地配置,按账号列表筛选;保留网页登录附带的官方服务地址。Codex 支持已核验的官方文件账号路径,keyring 或自定义路由缺少范围证据时不放行。MiMo 目前只接受可核验的本地配置,文件/环境插值和远程组织配置需先移除。OpenCode 原生 OAuth 写回缺少账号版本保护,暂只开放自身 API 配置。
|
|
249
|
+
|
|
250
|
+
Codex 能读取模型但当前额度耗尽时,设置明确提示等待额度恢复;认证失效或访问被拒绝单独提示检查登录。两者都保留现有账号和项目偏好,不把原生模型能力当成当前可调用权限。
|
|
208
251
|
|
|
209
252
|
Kimi 已有有效或可续期的自身原生登录时显示“已登录”及可确认的简短账号 ID;原生未保存邮箱或昵称时不编造,点击“管理登录”打开原生终端;切换账号由用户输入 `/logout` 后再输入 `/login`。账号终端使用独立空目录,不加载用户项目 MCP;原生若显示 Trust 提示,由用户自行确认。只有提供商配置而没有对应令牌时显示未登录,不会自动退出原账号。
|
|
210
253
|
|
|
211
254
|
Hermes 首次明确打开登录设置后使用插件内独立原生账号目录,自动导入关闭,状态、模型、任务统一绑定该目录;之后退出不会回退到全局旧账号。原全局账号和历史保留,Host 不把其他 CLI 导入凭据作为自身登录证据,不注入 Harness 认证;原生进程按自身权限运行。现有官方安装的已选依赖环境可直接复用,账号操作不触发重新安装。
|
|
212
255
|
|
|
213
|
-
Hermes 的 Nous
|
|
256
|
+
Hermes 的 Nous 登录按当前原生授权识别,模型来自该账号认证的官方目录及访问权限;无付费权限时仅开放明确免费的可用模型。Mac 与 Windows 共用自动续期:短期访问令牌临近过期或已过期时,使用同一账号的原生刷新凭据续期,健康令牌不额外启动进程。临时网络问题可刷新重试,只有刷新凭据缺失或明确失效才要求重新登录。续期不调用模型、不切换账号,也不清除额度或冷却限制;不会用旧快照恢复已退出的账号。
|
|
214
257
|
|
|
215
258
|
Grok 先核对自身官方 Build 访问门禁,再读取认证模型目录并匹配原生模型及强度能力;登录成功或目录 HTTP 200 均不能单独证明调用权限。是否有付费订阅也不能代替服务端门禁结果;未知或拒绝时保持空列表和简短原因,不通过生成请求试探。
|
|
216
259
|
|
|
@@ -317,6 +360,8 @@ pnpm --config.verify-deps-before-run=false build:preview
|
|
|
317
360
|
|
|
318
361
|
隔离包输出到 `.cache/preview-package`。先在隔离 profile 验收,确认没有活动任务后,再运行正式构建;避免开发构建影响 Desktop 正在使用的版本。
|
|
319
362
|
|
|
363
|
+
在 Mac 构建后,可通过 SSH 在自己的 Windows 原生测试机安装隔离依赖、运行定向回归并回传日志与包哈希;见 [Windows 远程测试指南](doc/windows-remote-testing.md)。入口为 `pnpm --config.verifyDepsBeforeRun=false test:windows:remote --config .test-data/windows-remote/config.json`,默认不调用模型或验收 Desktop 界面。
|
|
364
|
+
|
|
320
365
|
真实 CLI 验收是额外步骤,会使用对应账号与模型额度,不由以上自动测试代替:
|
|
321
366
|
|
|
322
367
|
```sh
|
package/lib/account-models.mjs
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
// Read-only account metadata. Never refresh OAuth, submit prompts, or return
|
|
2
2
|
// credentials, account IDs, headers, endpoint URLs, or raw exception messages.
|
|
3
3
|
const unknown = () => ({ state: 'unknown', source: 'unknown', models: [] })
|
|
4
|
-
const denied = () => ({
|
|
4
|
+
const denied = (denialReason) => ({
|
|
5
|
+
state: 'denied',
|
|
6
|
+
source: 'unknown',
|
|
7
|
+
models: [],
|
|
8
|
+
...(denialReason ? { denialReason } : {}),
|
|
9
|
+
})
|
|
5
10
|
const validId = (id) => typeof id === 'string' && !!id && id.length <= 1024 && !/[\s\x00-\x1f]/.test(id)
|
|
6
11
|
const object = (value) => value && typeof value === 'object' && !Array.isArray(value)
|
|
7
12
|
const unavailable = (model) =>
|
|
@@ -13,6 +18,7 @@ const unavailable = (model) =>
|
|
|
13
18
|
model.disabled === true ||
|
|
14
19
|
model.upgrade_required === true ||
|
|
15
20
|
model.visibility === 'hidden' ||
|
|
21
|
+
model.visibility === 'hide' ||
|
|
16
22
|
model.visibility === 'none'
|
|
17
23
|
const numericRate = (value) =>
|
|
18
24
|
typeof value === 'number'
|
|
@@ -55,6 +61,7 @@ function normalize(payload, oauth, token) {
|
|
|
55
61
|
if (!list) return undefined
|
|
56
62
|
const result = new Map()
|
|
57
63
|
for (const model of list) {
|
|
64
|
+
// Availability NUX is informational text, not an account denial.
|
|
58
65
|
if (!object(model) || unavailable(model)) continue
|
|
59
66
|
const id = model.slug ?? model.id
|
|
60
67
|
if (
|
|
@@ -65,6 +72,14 @@ function normalize(payload, oauth, token) {
|
|
|
65
72
|
)
|
|
66
73
|
continue
|
|
67
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
|
+
: []
|
|
68
83
|
result.set(id, {
|
|
69
84
|
id,
|
|
70
85
|
...(typeof name === 'string' &&
|
|
@@ -75,6 +90,7 @@ function normalize(payload, oauth, token) {
|
|
|
75
90
|
? { name }
|
|
76
91
|
: {}),
|
|
77
92
|
cost: costFor(model, oauth),
|
|
93
|
+
...(reasoningEfforts.length ? { reasoningEfforts } : {}),
|
|
78
94
|
})
|
|
79
95
|
}
|
|
80
96
|
return [...result.values()]
|
|
@@ -124,8 +140,17 @@ export async function probeAccountModels(input, options = {}) {
|
|
|
124
140
|
if (typeof token !== 'string' || !token.trim() || token.trimStart().startsWith('!')) return unknown()
|
|
125
141
|
// Near-expiry credentials cannot reliably finish the query. Do not renew them.
|
|
126
142
|
if (oauth && (typeof credential.expires !== 'number' || credential.expires <= Date.now() + 30000))
|
|
127
|
-
return denied()
|
|
143
|
+
return denied('authentication')
|
|
128
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'
|
|
129
154
|
// xAI/other subscription catalogs do not expose a verified per-account scope
|
|
130
155
|
// contract here. Do not turn an OAuth login into their whole public catalog.
|
|
131
156
|
if (oauth && !codex) return unknown()
|
|
@@ -142,8 +167,8 @@ export async function probeAccountModels(input, options = {}) {
|
|
|
142
167
|
if (input.apiType === 'anthropic-messages' && !oauth) {
|
|
143
168
|
// ZCode's native Anthropic factory sends both headers. Other callers keep
|
|
144
169
|
// the ordinary x-api-key contract unless they explicitly mirror that route.
|
|
145
|
-
if (
|
|
146
|
-
headers['x-api-key'] = token
|
|
170
|
+
if (!['api-key-and-bearer', 'bearer'].includes(input.anthropicAuth)) delete headers.Authorization
|
|
171
|
+
if (input.anthropicAuth !== 'bearer') headers['x-api-key'] = token
|
|
147
172
|
headers['anthropic-version'] = '2023-06-01'
|
|
148
173
|
}
|
|
149
174
|
if (codex) {
|
|
@@ -157,12 +182,12 @@ export async function probeAccountModels(input, options = {}) {
|
|
|
157
182
|
}
|
|
158
183
|
if (typeof accountId === 'string' && accountId) headers['chatgpt-account-id'] = accountId
|
|
159
184
|
headers['OpenAI-Beta'] = 'responses=experimental'
|
|
160
|
-
headers.originator = 'pi'
|
|
161
|
-
headers.version =
|
|
185
|
+
headers.originator = input.codexClientVersion ? 'cli_worker_models' : 'pi'
|
|
186
|
+
headers.version = codexVersion
|
|
162
187
|
}
|
|
163
188
|
const fetcher = options.fetch ?? globalThis.fetch
|
|
164
189
|
const request = async (path) => {
|
|
165
|
-
const target = `${base}${path}${codex && path !== '/wham/usage' ?
|
|
190
|
+
const target = `${base}${path}${codex && path !== '/wham/usage' ? `?client_version=${encodeURIComponent(codexVersion)}` : ''}`
|
|
166
191
|
const response = await fetcher(target, { method: 'GET', headers, signal, redirect: 'error' })
|
|
167
192
|
if (!response.ok) {
|
|
168
193
|
await response.body?.cancel()
|
|
@@ -179,7 +204,7 @@ export async function probeAccountModels(input, options = {}) {
|
|
|
179
204
|
: '/models',
|
|
180
205
|
]) {
|
|
181
206
|
modelResponse = await request(path)
|
|
182
|
-
if (modelResponse.status === 401 || modelResponse.status === 403) return denied()
|
|
207
|
+
if (modelResponse.status === 401 || modelResponse.status === 403) return denied('authentication')
|
|
183
208
|
if (modelResponse.status >= 200 && modelResponse.status < 300) break
|
|
184
209
|
if (![404, 405].includes(modelResponse.status)) return unknown()
|
|
185
210
|
}
|
|
@@ -191,7 +216,7 @@ export async function probeAccountModels(input, options = {}) {
|
|
|
191
216
|
return ['invalid_api_key', 'authentication_failed', 'unauthorized', 'forbidden', 401, 403].includes(
|
|
192
217
|
code,
|
|
193
218
|
)
|
|
194
|
-
? denied()
|
|
219
|
+
? denied('authentication')
|
|
195
220
|
: unknown()
|
|
196
221
|
}
|
|
197
222
|
const models = normalize(envelope, oauth, token)
|
|
@@ -199,13 +224,11 @@ export async function probeAccountModels(input, options = {}) {
|
|
|
199
224
|
if (codex) {
|
|
200
225
|
const usage = await request('/wham/usage')
|
|
201
226
|
const rate = usage.payload?.rate_limit
|
|
202
|
-
if (
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
)
|
|
208
|
-
return denied()
|
|
227
|
+
if (usage.status === 401 || usage.status === 403) return denied('authentication')
|
|
228
|
+
// Only the authenticated usage response establishes exhausted quota.
|
|
229
|
+
// Keep an unclassified denial distinct from expiry/401/403 and network failure.
|
|
230
|
+
if (usage.status === 200 && rate?.limit_reached === true) return denied('quota')
|
|
231
|
+
if (rate?.allowed === false || rate?.limit_reached === true) return denied()
|
|
209
232
|
// A catalog/menu is not evidence that the account has an executable quota.
|
|
210
233
|
if (usage.status !== 200 || rate?.allowed !== true || rate?.limit_reached !== false) return unknown()
|
|
211
234
|
const plan =
|
|
@@ -236,7 +259,12 @@ export async function probeAccountModels(input, options = {}) {
|
|
|
236
259
|
) {
|
|
237
260
|
for (const model of models) if (model.cost === 'free') model.cost = 'unknown'
|
|
238
261
|
}
|
|
239
|
-
return {
|
|
262
|
+
return {
|
|
263
|
+
state: 'supported',
|
|
264
|
+
source: 'account-models',
|
|
265
|
+
models,
|
|
266
|
+
...(!codex && entries(envelope)?.length === 0 ? { catalogEmpty: true } : {}),
|
|
267
|
+
}
|
|
240
268
|
}
|
|
241
269
|
if (!oauth && [404, 405].includes(modelResponse?.status)) {
|
|
242
270
|
// Declaring a custom model is not an account entitlement proof.
|
|
@@ -250,7 +278,10 @@ export async function probeAccountModels(input, options = {}) {
|
|
|
250
278
|
models: verified.map((id) => ({ id, cost: 'unknown' })),
|
|
251
279
|
}
|
|
252
280
|
}
|
|
253
|
-
return
|
|
281
|
+
return {
|
|
282
|
+
...unknown(),
|
|
283
|
+
...([404, 405].includes(modelResponse?.status) ? { catalogUnavailable: true } : {}),
|
|
284
|
+
}
|
|
254
285
|
} catch {
|
|
255
286
|
return unknown()
|
|
256
287
|
} finally {
|