dsh-cliworker-now 0.7.6 → 0.7.7

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.
Files changed (144) hide show
  1. package/README.en.md +29 -9
  2. package/README.md +31 -9
  3. package/lib/account-models.mjs +16 -13
  4. package/lib/client.js +658 -61
  5. package/lib/client.js.map +1 -1
  6. package/lib/grok-catalog.mjs +2 -2
  7. package/lib/hermes-native-entry.py +48 -13
  8. package/lib/hermes-nous-refresh.py +331 -0
  9. package/lib/index.js +3724 -1589
  10. package/lib/index.js.map +1 -1
  11. package/lib/native-launch.mjs +62 -7
  12. package/lib/native-spawn.mjs +32 -0
  13. package/lib/pi-installation.mjs +27 -3
  14. package/lib/pi-native-catalog.mjs +2 -2
  15. package/lib/pi-omp-bridge.mjs +2 -2
  16. package/lib/private-launch.mjs +6 -2
  17. package/lib/terminal-bridge.mjs +2 -2
  18. package/lib/typert.host.js +83 -11
  19. package/lib/typert.remote-client.d.ts +2 -0
  20. package/lib/typert.remote-client.d.ts.map +1 -1
  21. package/lib/typert.remote-client.js +77 -11
  22. package/lib/types/client/account-query-queue.d.ts +16 -0
  23. package/lib/types/client/account-query-queue.js +61 -0
  24. package/lib/types/client/account-query-queue.js.map +1 -0
  25. package/lib/types/client/account-terminal.d.ts +6 -2
  26. package/lib/types/client/account-terminal.js +260 -31
  27. package/lib/types/client/account-terminal.js.map +1 -1
  28. package/lib/types/client/settings-dialog.js +65 -38
  29. package/lib/types/client/settings-dialog.js.map +1 -1
  30. package/lib/types/client/zcode-login-link-provider.d.ts +9 -0
  31. package/lib/types/client/zcode-login-link-provider.js +105 -0
  32. package/lib/types/client/zcode-login-link-provider.js.map +1 -0
  33. package/lib/types/client/zcode-login-link.d.ts +16 -0
  34. package/lib/types/client/zcode-login-link.js +194 -0
  35. package/lib/types/client/zcode-login-link.js.map +1 -0
  36. package/lib/types/host/account-models.d.mts +3 -1
  37. package/lib/types/host/account-models.mjs +16 -13
  38. package/lib/types/host/accounts.d.ts +3 -2
  39. package/lib/types/host/accounts.js +129 -22
  40. package/lib/types/host/accounts.js.map +1 -1
  41. package/lib/types/host/adapters.d.ts +1 -1
  42. package/lib/types/host/adapters.js +60 -11
  43. package/lib/types/host/adapters.js.map +1 -1
  44. package/lib/types/host/agy-models.d.ts +2 -1
  45. package/lib/types/host/agy-models.js +6 -6
  46. package/lib/types/host/agy-models.js.map +1 -1
  47. package/lib/types/host/agy-windows-account.d.ts +14 -0
  48. package/lib/types/host/agy-windows-account.js +104 -0
  49. package/lib/types/host/agy-windows-account.js.map +1 -0
  50. package/lib/types/host/authorized-catalog.js +13 -4
  51. package/lib/types/host/authorized-catalog.js.map +1 -1
  52. package/lib/types/host/claude-native-oauth.d.ts +17 -0
  53. package/lib/types/host/claude-native-oauth.js +272 -0
  54. package/lib/types/host/claude-native-oauth.js.map +1 -0
  55. package/lib/types/host/claude-own-route.d.ts +33 -0
  56. package/lib/types/host/claude-own-route.js +250 -0
  57. package/lib/types/host/claude-own-route.js.map +1 -0
  58. package/lib/types/host/cli-account-binding.d.ts +2 -1
  59. package/lib/types/host/cli-account-binding.js +59 -21
  60. package/lib/types/host/cli-account-binding.js.map +1 -1
  61. package/lib/types/host/codex-models.js +4 -0
  62. package/lib/types/host/codex-models.js.map +1 -1
  63. package/lib/types/host/extended-adapters.d.ts +3 -2
  64. package/lib/types/host/extended-adapters.js +9 -7
  65. package/lib/types/host/extended-adapters.js.map +1 -1
  66. package/lib/types/host/first-party-models.d.ts +1 -0
  67. package/lib/types/host/first-party-models.js +136 -47
  68. package/lib/types/host/first-party-models.js.map +1 -1
  69. package/lib/types/host/hermes-accounts.js +15 -1
  70. package/lib/types/host/hermes-accounts.js.map +1 -1
  71. package/lib/types/host/hermes-adapter.d.ts +3 -0
  72. package/lib/types/host/hermes-adapter.js +13 -4
  73. package/lib/types/host/hermes-adapter.js.map +1 -1
  74. package/lib/types/host/hermes-installation.js +54 -35
  75. package/lib/types/host/hermes-installation.js.map +1 -1
  76. package/lib/types/host/hermes-native-entry.py +48 -13
  77. package/lib/types/host/hermes-nous-refresh.py +331 -0
  78. package/lib/types/host/hermes-nous.d.ts +5 -1
  79. package/lib/types/host/hermes-nous.js +5 -5
  80. package/lib/types/host/hermes-nous.js.map +1 -1
  81. package/lib/types/host/hermes-renewal.d.ts +27 -0
  82. package/lib/types/host/hermes-renewal.js +292 -0
  83. package/lib/types/host/hermes-renewal.js.map +1 -0
  84. package/lib/types/host/hermes-windows-installation.d.ts +5 -0
  85. package/lib/types/host/hermes-windows-installation.js +91 -0
  86. package/lib/types/host/hermes-windows-installation.js.map +1 -0
  87. package/lib/types/host/index.d.ts +2 -0
  88. package/lib/types/host/index.js +17 -2
  89. package/lib/types/host/index.js.map +1 -1
  90. package/lib/types/host/kimi-accounts.d.ts +2 -0
  91. package/lib/types/host/kimi-accounts.js +4 -2
  92. package/lib/types/host/kimi-accounts.js.map +1 -1
  93. package/lib/types/host/kimi-oauth-models.d.ts +14 -0
  94. package/lib/types/host/kimi-oauth-models.js +246 -0
  95. package/lib/types/host/kimi-oauth-models.js.map +1 -0
  96. package/lib/types/host/mimo-metadata-cache.d.ts +22 -0
  97. package/lib/types/host/mimo-metadata-cache.js +121 -0
  98. package/lib/types/host/mimo-metadata-cache.js.map +1 -0
  99. package/lib/types/host/native-capability-cache.d.ts +11 -0
  100. package/lib/types/host/native-capability-cache.js +94 -0
  101. package/lib/types/host/native-capability-cache.js.map +1 -0
  102. package/lib/types/host/native-launch.mjs +62 -7
  103. package/lib/types/host/native-process.d.ts +3 -1
  104. package/lib/types/host/native-process.js +18 -3
  105. package/lib/types/host/native-process.js.map +1 -1
  106. package/lib/types/host/native-spawn.mjs +32 -0
  107. package/lib/types/host/pi-installation.d.mts +1 -1
  108. package/lib/types/host/pi-installation.mjs +27 -3
  109. package/lib/types/host/pi-omp-adapter.js +15 -1
  110. package/lib/types/host/pi-omp-adapter.js.map +1 -1
  111. package/lib/types/host/private-launch.mjs +23 -0
  112. package/lib/types/host/routing.js +25 -2
  113. package/lib/types/host/routing.js.map +1 -1
  114. package/lib/types/host/runtime.js +17 -5
  115. package/lib/types/host/runtime.js.map +1 -1
  116. package/lib/types/host/windows-account-bootstrap.ps1 +44 -0
  117. package/lib/types/host/windows-account-launch.mjs +47 -0
  118. package/lib/types/host/windows-account-owner.ps1 +137 -0
  119. package/lib/types/host/windows-account-stdio.mjs +19 -0
  120. package/lib/types/host/windows-account-terminal.d.ts +17 -0
  121. package/lib/types/host/windows-account-terminal.js +208 -0
  122. package/lib/types/host/windows-account-terminal.js.map +1 -0
  123. package/lib/types/host/windows-agy-account.ps1 +81 -0
  124. package/lib/types/host/windows-cli-installation.d.ts +31 -0
  125. package/lib/types/host/windows-cli-installation.js +157 -0
  126. package/lib/types/host/windows-cli-installation.js.map +1 -0
  127. package/lib/types/host/windows-hidden-launch.mjs +49 -0
  128. package/lib/types/host/windows-hidden-process.d.ts +12 -0
  129. package/lib/types/host/windows-hidden-process.js +116 -0
  130. package/lib/types/host/windows-hidden-process.js.map +1 -0
  131. package/lib/types/host/zcode-adapter.js +5 -1
  132. package/lib/types/host/zcode-adapter.js.map +1 -1
  133. package/lib/types/host/zcode-grok-accounts.d.ts +3 -1
  134. package/lib/types/host/zcode-grok-accounts.js +60 -11
  135. package/lib/types/host/zcode-grok-accounts.js.map +1 -1
  136. package/lib/types/shared/accounts.d.ts +4 -0
  137. package/lib/windows-account-bootstrap.ps1 +44 -0
  138. package/lib/windows-account-launch.mjs +47 -0
  139. package/lib/windows-account-owner.ps1 +137 -0
  140. package/lib/windows-account-stdio.mjs +19 -0
  141. package/lib/windows-agy-account.ps1 +81 -0
  142. package/lib/windows-hidden-launch.mjs +49 -0
  143. package/lib/zcode-resume.mjs +2 -2
  144. package/package.json +1 -1
package/README.en.md CHANGED
@@ -107,12 +107,20 @@ An integrated adapter does not mean every model, subscription or platform has be
107
107
  | ZCode | 0.16.9 | Native authentication, headless execution and session protocol integrated; see its probe record |
108
108
  | Grok Build | 1.0.0 | Own login, official Build access permission and model directory checked separately; generation remains unverified |
109
109
  | 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 |
110
+ | 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
111
  | 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
112
  | 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
113
 
114
114
  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
115
 
116
+ 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.
117
+
118
+ 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
+
120
+ Verified Kimi managed OAuth model capabilities and Claude command-parameter capabilities can also be reused briefly. Each catalog query 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.
121
+
122
+ 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
+
116
124
  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
125
 
118
126
  ## 5. Installation and updates
@@ -120,7 +128,7 @@ Probe records: [ZCode](doc/zcode-probe.md) · [Grok](doc/grok-probe.md) · [Pi /
120
128
  ### 5.1 One-line install
121
129
 
122
130
  ```sh
123
- dsh plugin --profile desktop add dsh-cliworker-now@0.7.6
131
+ dsh plugin --profile desktop add dsh-cliworker-now@0.7.7
124
132
  ```
125
133
 
126
134
  <details>
@@ -129,15 +137,15 @@ dsh plugin --profile desktop add dsh-cliworker-now@0.7.6
129
137
  For the Web profile:
130
138
 
131
139
  ```sh
132
- dsh plugin --profile web add dsh-cliworker-now@0.7.6
140
+ dsh plugin --profile web add dsh-cliworker-now@0.7.7
133
141
  ```
134
142
 
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@0.7.6` in the plugin manager's Add Plugin dialog.
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@0.7.7` in the plugin manager's Add Plugin dialog.
136
144
 
137
145
  GitHub Release fallback:
138
146
 
139
147
  ```sh
140
- dsh plugin --profile desktop add https://github.com/SuperWheel/cliworker-now/releases/download/v0.7.6/dsh-cliworker-now-0.7.6.tgz
148
+ dsh plugin --profile desktop add https://github.com/SuperWheel/cliworker-now/releases/download/v0.7.7/dsh-cliworker-now-0.7.7.tgz
141
149
  ```
142
150
 
143
151
  For source development:
@@ -174,7 +182,7 @@ Short aliases are also supported:
174
182
  >
175
183
  > Use glm CLI to check this code.
176
184
 
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”.
185
+ `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
186
 
179
187
  The first use of a project and CLI opens a native Harness question card for:
180
188
 
@@ -197,6 +205,14 @@ Model menus show readable names without provider or organization path prefixes o
197
205
 
198
206
  **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
207
 
208
+ 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.
209
+
210
+ 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
+
212
+ 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
+
214
+ 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
+
200
216
  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
217
 
202
218
  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 +223,12 @@ Some account modes have additional boundaries:
207
223
 
208
224
  - **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
225
  - **Codex:** supports checked official file-based accounts. Keyring accounts or custom routes remain unavailable when account scope cannot be established.
210
- - **Claude, Kimi and OpenCode:** unsupported OAuth model-discovery modes currently show an empty model list. 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.
211
- - **MiMo:** 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.
226
+ - **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.
227
+ - **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.
228
+ - **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.
229
+ - **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
230
  - **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. Discovery does not refresh or generate. Authentication that does not meet native execution's remaining-lifetime requirement asks for login again.
231
+ - **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
232
  - **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
233
 
216
234
  ```mermaid
@@ -314,6 +332,8 @@ pnpm --config.verify-deps-before-run=false build:preview
314
332
 
315
333
  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
334
 
335
+ 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.
336
+
317
337
  Live CLI acceptance is separate and uses the selected account's model allowance:
318
338
 
319
339
  ```sh
package/README.md CHANGED
@@ -72,6 +72,8 @@ CLI Worker Now 是 **DeepSeek Harness 的独立多 CLI 智能体插件**。它
72
72
 
73
73
  每个 CLI 可以单独开启或关闭,分别管理账号、项目默认模型与思考强度。支持的 CLI 可直接打开原生账号终端;登录状态与账号来源按各 CLI 的实际能力显示。
74
74
 
75
+ macOS 与 Windows 共用同一账号终端,支持选择文字复制及 Cmd+V/Ctrl+V 粘贴;右键在有选区时复制、无选区时粘贴,输入位置使用闪烁块状光标。登录时直接打开原生授权网页;Windows ZCode 的完整登录网址也可在终端点击或选择复制到浏览器。
76
+
75
77
  ![Harness 中的 CLI 连接设置:选取无个人账号标识的 OMP 页面](doc/assets/readme/cli-settings.jpg)
76
78
 
77
79
  ### 3.4 亮暗主题与交互
@@ -106,12 +108,20 @@ CLI Worker Now 是 **DeepSeek Harness 的独立多 CLI 智能体插件**。它
106
108
  | ZCode | 0.16.9 | 原生登录、headless 与会话协议已接入;详见专项记录 |
107
109
  | Grok Build | 1.0.0 | 自身登录、官方 Build 访问许可和模型目录分别核对;目录可读不等于有调用权限,真实生成未验收 |
108
110
  | 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 本轮仅只读/离线核验 |
111
+ | 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
112
  | Hermes Agent | 当前安装 checkout 6c80c32734 | 独立自身账号目录、原生登录菜单及 Nous 自身账号目录已验收;只读确认 10 个免费模型,真实生成与续聊未验收 |
111
113
  | OpenCode | 1.18.21 | 原生目录与 JSONL 接入;智谱模型已实测,免费 MiMo 请求曾返回 403 |
112
114
 
113
115
  MiMo 指 [XiaomiMiMo/MiMo-Code](https://github.com/XiaomiMiMo/MiMo-Code)。Hermes Agent 替代的是旧的外部 Harness CLI 入口,**DeepSeek Harness 宿主仍是插件的运行基础**。
114
116
 
117
+ MiMo 短时间重复加载模型能力时复用有界内存缓存,减少 Windows 上反复启动 CLI 的等待。首次加载仍需查询原生 CLI;账号、配置、项目或程序变化使缓存失效,每次派遣仍核对当前账号授权。
118
+
119
+ 设置页的账号状态请求最多两个并发,包含当前选中的 CLI。首次打开优先当前项,切换时只调整待排顺序;模型目录另行查询,因此这不是全部子进程的数量上限。关闭或禁用会取消对应读取,底层进程清理仍由 Host 管理。
120
+
121
+ Kimi 已核验的 managed OAuth 模型能力和 Claude 的命令参数能力也可短时复用;每次目录查询仍核对当前凭据、有效期和远端权限,不缓存远端额度。Windows 后台查询及嵌入式账号终端的启动器隐藏额外控制台窗口。
122
+
123
+ 成功且进程退出已确认的扩展 CLI 模型查询会自动删除本次临时目录和原生解压缓存;失败或清理未确认时保留现场,不删除原始账号文件。
124
+
115
125
  专项记录:[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
126
 
117
127
  ## 5. 安装与更新
@@ -119,7 +129,7 @@ MiMo 指 [XiaomiMiMo/MiMo-Code](https://github.com/XiaomiMiMo/MiMo-Code)。Herme
119
129
  ### 5.1 一行安装
120
130
 
121
131
  ```sh
122
- dsh plugin --profile desktop add dsh-cliworker-now@0.7.6
132
+ dsh plugin --profile desktop add dsh-cliworker-now@0.7.7
123
133
  ```
124
134
 
125
135
  <details>
@@ -128,15 +138,15 @@ dsh plugin --profile desktop add dsh-cliworker-now@0.7.6
128
138
  使用 Web profile 时:
129
139
 
130
140
  ```sh
131
- dsh plugin --profile web add dsh-cliworker-now@0.7.6
141
+ dsh plugin --profile web add dsh-cliworker-now@0.7.7
132
142
  ```
133
143
 
134
- 安装或更新前先结束活动任务并完整退出 Harness,完成后重新打开。npm 包已预构建,无需手动解压或编译。也可以在插件页“添加插件”中输入 `dsh-cliworker-now@0.7.6`。
144
+ 安装或更新前先结束活动任务并完整退出 Harness,完成后重新打开。npm 包已预构建,无需手动解压或编译。也可以在插件页“添加插件”中输入 `dsh-cliworker-now@0.7.7`。
135
145
 
136
146
  GitHub Release 备用安装:
137
147
 
138
148
  ```sh
139
- dsh plugin --profile desktop add https://github.com/SuperWheel/cliworker-now/releases/download/v0.7.6/dsh-cliworker-now-0.7.6.tgz
149
+ dsh plugin --profile desktop add https://github.com/SuperWheel/cliworker-now/releases/download/v0.7.7/dsh-cliworker-now-0.7.7.tgz
140
150
  ```
141
151
 
142
152
  从源码开发:
@@ -173,7 +183,7 @@ dsh plugin --profile desktop remove dsh-cliworker-now
173
183
  >
174
184
  > 调用 glm cli 帮我检查这段代码。
175
185
 
176
- `agy` 对应 **Antigravity**,`glm / zhipu / 智谱` 对应 **ZCode**,`harmes` 对应 **Hermes Agent**。插件会为当前明确调用提供路由提示,并在派遣工具里统一解析名称;较长名称的轻微拼写误差只有唯一候选时才接受。未知名称或多个目标返回简短错误和候选,不自动派遣,普通模型讨论、否定调用和引用示例不会触发路由提示。是否调用工具仍由 Harness 主模型决定;如果模型忽略请求,可明确说“使用 CLI Worker 插件调用 agy CLI”。
186
+ `agy` 对应 **Antigravity**,`glm / zhipu / 智谱` 对应 **ZCode**,`harmes` 对应 **Hermes Agent**。插件会为当前明确调用提供路由提示,并在派遣工具里统一解析名称;支持 `Antigravity(agy)CLI` 这样的同名别名,重复指定同一 CLI 仍视为一个目标。较长名称的轻微拼写误差只有唯一候选时才接受。未知名称或多个目标返回简短错误和候选,不自动派遣,普通模型讨论、否定调用和引用示例不会触发路由提示。是否调用工具仍由 Harness 主模型决定;如果模型忽略请求,可明确说“使用 CLI Worker 插件调用 agy CLI”。
177
187
 
178
188
  首次使用相应项目和 CLI 时,通过 Harness 原生问题卡片选择:
179
189
 
@@ -196,21 +206,31 @@ dsh plugin --profile desktop remove dsh-cliworker-now
196
206
 
197
207
  OMP(Oh My Pi)与 Pi Coding Agent 是两个独立 CLI;安装、账号、模型和会话各自管理,即使使用相同模型也不能互换。插件核验实际执行程序身份;Pi 优先使用已核验的原生安装,不暗中切换到另一旧版。
198
208
 
209
+ Windows 也能发现当前用户注册的官方 Codex 应用包内 CLI 和官方 npm 固定入口,以及 Hermes 的官方安装目录;只有安装痕迹而没有可执行文件时会提示完成安装。Windows 支持已核验的 Pi 官方固定启动器,以及 OpenCode npm 包声明的原生程序入口。插件静态解析并校验安装身份;无法确认或已损坏的入口会提示检查安装。Pi 其他版本需先核验 SDK/RPC 和原生菜单后接入。
210
+
199
211
  OMP、Pi、Hermes 和 OpenCode 的账号行按自身认证显示服务商及方式。有账号登录时简写为“OpenAI账号登录”等,完整安全身份及其他 API 认证保留在悬浮详情;仅 API 时显示“zai.cn API 登录”等。有效认证不会统一降成“已配置”。只有配置声明、缺失或失效凭据保留对应灰/红状态,模型权限仍单独核对。
200
212
 
201
213
  OMP、Pi 和 Hermes 的“退出”使用统一按钮并打开各自原生退出菜单。多个自身账号目录先选择来源;操作针对所选真实来源,其他来源保留。Pi/OMP 原生退出不能删除的 `.env` 或模型配置内 API,需在原配置中管理。Hermes 原生写入的停用来源会同步约束登录、模型和调用,不从保留的配置值恢复账号。
202
214
 
215
+ 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
+
217
+ Windows 的原生授权网址会完整打开一次,也可在终端中点击或选择复制;网页打开不代表授权已完成,需按官方网页提示完成登录。
218
+
203
219
  账号发现和执行绑定同一来源;保存选型、新任务、排队出队和续聊都会重新核对账号、模型与强度。换号或退出会阻止旧任务启动,历史任务换号后需新建任务;升级前未记录账号绑定的历史任务也需新建,原对话保留。插件不读取其他 CLI 的凭据,也不继承 Harness API 凭据;旧 `zaiCredentialRef` 配置兼容读取但不生效。旧派生认证快照会按当前自身来源重建,原生账号、历史会话和偏好保留;失效偏好需重新选择。
204
220
 
205
- Antigravity 使用自身原生登录和实时 `agy models` 目录,只展示原生返回的模型及强度变体。账号读取先完成,模型查询的等待或失败不会把已登录账号改为未登录。重复的在途账号读取会合并,后续刷新与执行授权仍读取当前账号。
221
+ Antigravity 使用自身原生登录和实时 `agy models` 目录,只展示原生返回的模型及强度变体。Windows 使用原生 Credential Manager 中当前交互式用户的账号,仅返回安全身份摘要。账号读取先完成,模型查询的等待或失败不会把已登录账号改为未登录。重复的在途账号读取会合并,后续刷新与执行授权仍读取当前账号。
222
+
223
+ Claude 会显示当前来源:自身配置的本地代理可达时使用代理,代理关闭时使用原生官方账号。代理认证或模型查询失败会明确报错,不自动换号。官方登录/退出只作用于官方账号,保留代理设置;任务启动前固定来源,不在运行中切换。官方 OAuth 模型需同时通过原生身份、模型能力和剩余额度核验;缺少证据时不放行。
206
224
 
207
- 当前账号范围边界:Claude/Kimi 的未支持 OAuth 模式及 OpenCode OAuth 暂显示空列表。Claude 自身设置中的 API Key、Kimi 自身 API 配置、MiMo 原生网页登录写入的自身 API 认证,以及可核对的本地配置,按账号列表筛选;保留网页登录附带的官方服务地址。Codex 支持已核验的官方文件账号路径,keyring 或自定义路由缺少范围证据时不放行。MiMo 目前只接受可核验的本地配置,文件/环境插值和远程组织配置需先移除。OpenCode 原生 OAuth 写回缺少账号版本保护,暂只开放自身 API 配置。
225
+ 当前账号范围边界:Kimi 原生 managed OAuth 使用自身模型别名、认证目录和可确认的套餐额度;额度为空、未知或耗尽时提示检查账号。其他未核验的 Kimi OAuth 模式及 OpenCode OAuth 暂不开放派遣。Claude 自身设置中的 API Key/Bearer Token、Kimi 自身 API 配置、MiMo 原生网页登录写入的自身 API 认证,以及可核对的本地配置,按账号列表筛选;保留网页登录附带的官方服务地址。Codex 支持已核验的官方文件账号路径,keyring 或自定义路由缺少范围证据时不放行。MiMo 目前只接受可核验的本地配置,文件/环境插值和远程组织配置需先移除。OpenCode 原生 OAuth 写回缺少账号版本保护,暂只开放自身 API 配置。
226
+
227
+ Codex 能读取模型但当前额度耗尽时,设置明确提示等待额度恢复;认证失效或访问被拒绝单独提示检查登录。两者都保留现有账号和项目偏好,不把原生模型能力当成当前可调用权限。
208
228
 
209
229
  Kimi 已有有效或可续期的自身原生登录时显示“已登录”及可确认的简短账号 ID;原生未保存邮箱或昵称时不编造,点击“管理登录”打开原生终端;切换账号由用户输入 `/logout` 后再输入 `/login`。账号终端使用独立空目录,不加载用户项目 MCP;原生若显示 Trust 提示,由用户自行确认。只有提供商配置而没有对应令牌时显示未登录,不会自动退出原账号。
210
230
 
211
231
  Hermes 首次明确打开登录设置后使用插件内独立原生账号目录,自动导入关闭,状态、模型、任务统一绑定该目录;之后退出不会回退到全局旧账号。原全局账号和历史保留,Host 不把其他 CLI 导入凭据作为自身登录证据,不注入 Harness 认证;原生进程按自身权限运行。现有官方安装的已选依赖环境可直接复用,账号操作不触发重新安装。
212
232
 
213
- Hermes 的 Nous 登录按当前原生授权识别,模型来自该账号认证的官方目录及访问权限;无付费权限时仅开放明确免费的可用模型。目录查询不自动续期或生成,当前认证不足原生执行所需的有效期时提示重新登录;不会用旧快照恢复账号。
233
+ Hermes 的 Nous 登录按当前原生授权识别,模型来自该账号认证的官方目录及访问权限;无付费权限时仅开放明确免费的可用模型。Mac 与 Windows 共用自动续期:短期访问令牌临近过期或已过期时,使用同一账号的原生刷新凭据续期,健康令牌不额外启动进程。临时网络问题可刷新重试,只有刷新凭据缺失或明确失效才要求重新登录。续期不调用模型、不切换账号,也不清除额度或冷却限制;不会用旧快照恢复已退出的账号。
214
234
 
215
235
  Grok 先核对自身官方 Build 访问门禁,再读取认证模型目录并匹配原生模型及强度能力;登录成功或目录 HTTP 200 均不能单独证明调用权限。是否有付费订阅也不能代替服务端门禁结果;未知或拒绝时保持空列表和简短原因,不通过生成请求试探。
216
236
 
@@ -317,6 +337,8 @@ pnpm --config.verify-deps-before-run=false build:preview
317
337
 
318
338
  隔离包输出到 `.cache/preview-package`。先在隔离 profile 验收,确认没有活动任务后,再运行正式构建;避免开发构建影响 Desktop 正在使用的版本。
319
339
 
340
+ 在 Mac 构建后,可通过 SSH 在自己的 Windows 原生测试机安装隔离依赖、运行定向回归并回传日志与包哈希;见 [Windows 远程测试指南](doc/windows-remote-testing.md)。入口为 `pnpm --config.verifyDepsBeforeRun=false test:windows:remote --config .test-data/windows-remote/config.json`,默认不调用模型或验收 Desktop 界面。
341
+
320
342
  真实 CLI 验收是额外步骤,会使用对应账号与模型额度,不由以上自动测试代替:
321
343
 
322
344
  ```sh
@@ -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 = () => ({ state: 'denied', source: 'unknown', models: [] })
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) =>
@@ -124,7 +129,7 @@ export async function probeAccountModels(input, options = {}) {
124
129
  if (typeof token !== 'string' || !token.trim() || token.trimStart().startsWith('!')) return unknown()
125
130
  // Near-expiry credentials cannot reliably finish the query. Do not renew them.
126
131
  if (oauth && (typeof credential.expires !== 'number' || credential.expires <= Date.now() + 30000))
127
- return denied()
132
+ return denied('authentication')
128
133
  const codex = oauth && ['openai', 'openai-codex'].includes(input.provider)
129
134
  // xAI/other subscription catalogs do not expose a verified per-account scope
130
135
  // contract here. Do not turn an OAuth login into their whole public catalog.
@@ -142,8 +147,8 @@ export async function probeAccountModels(input, options = {}) {
142
147
  if (input.apiType === 'anthropic-messages' && !oauth) {
143
148
  // ZCode's native Anthropic factory sends both headers. Other callers keep
144
149
  // the ordinary x-api-key contract unless they explicitly mirror that route.
145
- if (input.anthropicAuth !== 'api-key-and-bearer') delete headers.Authorization
146
- headers['x-api-key'] = token
150
+ if (!['api-key-and-bearer', 'bearer'].includes(input.anthropicAuth)) delete headers.Authorization
151
+ if (input.anthropicAuth !== 'bearer') headers['x-api-key'] = token
147
152
  headers['anthropic-version'] = '2023-06-01'
148
153
  }
149
154
  if (codex) {
@@ -179,7 +184,7 @@ export async function probeAccountModels(input, options = {}) {
179
184
  : '/models',
180
185
  ]) {
181
186
  modelResponse = await request(path)
182
- if (modelResponse.status === 401 || modelResponse.status === 403) return denied()
187
+ if (modelResponse.status === 401 || modelResponse.status === 403) return denied('authentication')
183
188
  if (modelResponse.status >= 200 && modelResponse.status < 300) break
184
189
  if (![404, 405].includes(modelResponse.status)) return unknown()
185
190
  }
@@ -191,7 +196,7 @@ export async function probeAccountModels(input, options = {}) {
191
196
  return ['invalid_api_key', 'authentication_failed', 'unauthorized', 'forbidden', 401, 403].includes(
192
197
  code,
193
198
  )
194
- ? denied()
199
+ ? denied('authentication')
195
200
  : unknown()
196
201
  }
197
202
  const models = normalize(envelope, oauth, token)
@@ -199,13 +204,11 @@ export async function probeAccountModels(input, options = {}) {
199
204
  if (codex) {
200
205
  const usage = await request('/wham/usage')
201
206
  const rate = usage.payload?.rate_limit
202
- if (
203
- usage.status === 401 ||
204
- usage.status === 403 ||
205
- rate?.allowed === false ||
206
- rate?.limit_reached === true
207
- )
208
- return denied()
207
+ if (usage.status === 401 || usage.status === 403) return denied('authentication')
208
+ // Only the authenticated usage response establishes exhausted quota.
209
+ // Keep an unclassified denial distinct from expiry/401/403 and network failure.
210
+ if (usage.status === 200 && rate?.limit_reached === true) return denied('quota')
211
+ if (rate?.allowed === false || rate?.limit_reached === true) return denied()
209
212
  // A catalog/menu is not evidence that the account has an executable quota.
210
213
  if (usage.status !== 200 || rate?.allowed !== true || rate?.limit_reached !== false) return unknown()
211
214
  const plan =