dsh-keys-manager 0.2.5 → 0.2.6
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/CHANGELOG.md +15 -0
- package/README.md +41 -4
- package/README.zh-CN.md +15 -4
- package/lib/index.js +21 -9
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to dsh-keys-manager are documented here. Assembled from `.changes/unreleased/` fragments by the release-prep workflow.
|
|
4
4
|
|
|
5
|
+
## [0.2.6] - 2026-10-24
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Add the bundled `lib/omp/google.mjs` artifact: omp's Gemini Cloud Code Assist provider, shared by the `google-gemini-cli` and `google-antigravity` routes and dispatching on `model.provider`, with a manifest entry, pinned source hashes and a calibrated size ceiling.
|
|
10
|
+
- Add the generated Google model tables (`google-gemini-cli`, `google-antigravity`) and their `googleGeminiCliCatalogModels()` / `googleAntigravityCatalogModels()` projections for host-side model pickers.
|
|
11
|
+
- Add the `google-gemini-cli` and `google-antigravity` sign-in flows: a loopback listener on `127.0.0.1` (port fallback to an ephemeral port, five-minute bounded wait, abort-safe), a paste fallback, Cloud Code Assist project discovery and a single-window token refresh that preserves the project and an un-rotated refresh token.
|
|
12
|
+
- Register both Google routes: configurable `providers.google-gemini-cli` / `providers.google-antigravity` allow-lists, catalog-model exports for host pickers, and lazy loading of the shared `lib/omp/google.mjs` artifact (a missing build reaches the request as `TRANSPORT_UNAVAILABLE`, never a failed start).
|
|
13
|
+
- Project the transport package's model catalogs into the Keys Manager model picker for the `google-gemini-cli`, `google-antigravity` and `factory-droid` routes, each from its own catalog export.
|
|
14
|
+
- A transport build that registers one of these routes without shipping its catalog reports the missing catalog in the picker's response instead of showing an unexplained empty model list.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Fix the Cursor route's file and shell tools: DSH tools whose names collide with Cursor's native exec channel (`read`, `bash`, `write`, `delete`, `ls`, `grep`, `todo`) are advertised as `dsh_<name>` so the transport keeps them in its MCP tool list; the event stream restores the DSH name on the tool call, while history replay keeps the advertised `dsh_<name>` alias so the follow-up request matches. The seven `dsh_<native>` names are reserved: declaring a DSH tool under one fails the request with `TOOL_ALIAS_COLLISION` instead of being silently resolved.
|
|
19
|
+
|
|
5
20
|
## [0.2.5] - 2026-10-23
|
|
6
21
|
|
|
7
22
|
### Added
|
package/README.md
CHANGED
|
@@ -24,7 +24,9 @@ manager.
|
|
|
24
24
|
- OAuth account sign-in for seven pi-ai-backed providers, stored beside
|
|
25
25
|
the API keys.
|
|
26
26
|
- A companion transport component for providers the vendored pi-ai cannot
|
|
27
|
-
speak — Cursor (`cursor`)
|
|
27
|
+
speak — four routes: Cursor (`cursor`), Devin (`devin`), Google Gemini CLI
|
|
28
|
+
(`google-gemini-cli`) and Google Antigravity (`google-antigravity`) —
|
|
29
|
+
installed with the plugin.
|
|
28
30
|
|
|
29
31
|
### Extra providers
|
|
30
32
|
|
|
@@ -101,7 +103,8 @@ Installing `dsh-keys-manager` installs two bundle components. The published
|
|
|
101
103
|
package depends on `dsh-llm-omp-transports`, so one install resolves both npm
|
|
102
104
|
packages, and the plugin page lists both `dsh-keys-manager` and
|
|
103
105
|
`llm-omp-transports`. Enable both: the manager owns credentials and routing,
|
|
104
|
-
the transport component owns the
|
|
106
|
+
the transport component owns the wire protocols of its four routes (Cursor,
|
|
107
|
+
Devin, and the two Google routes).
|
|
105
108
|
|
|
106
109
|
### Install — local checkout
|
|
107
110
|
|
|
@@ -195,6 +198,13 @@ pi-ai key pool and take part in sticky selection, round-robin, retry failover
|
|
|
195
198
|
and cooldowns. The `llm-omp-transports` surface described below is the other
|
|
196
199
|
thing entirely: one grant per route, each with its own section.
|
|
197
200
|
|
|
201
|
+
**`muse-code` needs no transport.** It is already served by the vendored pi-ai
|
|
202
|
+
`meta` route (`openai-responses` against `https://api.meta.ai/v1`, catalog key
|
|
203
|
+
`meta`), so it is managed through the ordinary pi-ai provider path. The check
|
|
204
|
+
that the catalog entry and the provider agree on that route and credential
|
|
205
|
+
shape was static; no live request was made. The first live call is a manual
|
|
206
|
+
smoke check, as described in [Known limits](docs/known-limits.md).
|
|
207
|
+
|
|
198
208
|
### Cursor transport
|
|
199
209
|
|
|
200
210
|
Cursor is served by the companion `dsh-llm-omp-transports` component on its
|
|
@@ -236,6 +246,33 @@ component, on its own `devin` route with the same one-grant record at
|
|
|
236
246
|
[transports package known limits](packages/llm-omp/docs/known-limits.md)
|
|
237
247
|
before relying on it.
|
|
238
248
|
|
|
249
|
+
### Google transports
|
|
250
|
+
|
|
251
|
+
Two Google routes are served by the same `dsh-llm-omp-transports` component.
|
|
252
|
+
They share one generated `lib/omp/google.mjs` artifact and the provider inside
|
|
253
|
+
it dispatches on the model, but each route is separate everywhere else:
|
|
254
|
+
`google-gemini-cli` and `google-antigravity`, each with its own one-grant
|
|
255
|
+
record at `llm-omp-transports/<route>`, its own account row and its own model
|
|
256
|
+
catalog.
|
|
257
|
+
|
|
258
|
+
- Sign in from the **Transport accounts** section. This login finishes in the
|
|
259
|
+
plugin itself: a `node:http` listener on `127.0.0.1` receives the browser
|
|
260
|
+
redirect (`8085` `/oauth2callback` for `google-gemini-cli`, `51121`
|
|
261
|
+
`/oauth-callback` for `google-antigravity`, with a free-port fallback when
|
|
262
|
+
the default is taken). The same dialog always offers the paste path — the
|
|
263
|
+
full address the browser landed on, or `code#state` — for a browser that
|
|
264
|
+
cannot reach the listener.
|
|
265
|
+
- The grant is `{access, refresh, expires, projectId, email?}` and refreshes
|
|
266
|
+
on the credential seam, so an expired token is renewed without re-login
|
|
267
|
+
while the refresh token stays valid. Sign-in also resolves the Google Cloud
|
|
268
|
+
project the route bills and sends.
|
|
269
|
+
- Models come from the pinned catalog at build time: seven rows for
|
|
270
|
+
`google-gemini-cli`, 22 for `google-antigravity`.
|
|
271
|
+
- The clients are unofficial and present vendor-internal OAuth identities; the
|
|
272
|
+
first live turn on either route is a manual smoke check. Read the
|
|
273
|
+
[Known limits](docs/known-limits.md) for the listener, the antigravity
|
|
274
|
+
version read and the 401/403 posture before relying on them.
|
|
275
|
+
|
|
239
276
|
### Selection and failure policy
|
|
240
277
|
|
|
241
278
|
- **Sticky session**: the first request of a session selects a key and binds
|
|
@@ -314,7 +351,7 @@ This repository is a pnpm workspace with two published packages:
|
|
|
314
351
|
| Path | npm package | Role |
|
|
315
352
|
|---|---|---|
|
|
316
353
|
| root | `dsh-keys-manager` | Host plugin, Keys Manager Web client, bundle patch |
|
|
317
|
-
| `packages/llm-omp` | `dsh-llm-omp-transports` | Cursor and
|
|
354
|
+
| `packages/llm-omp` | `dsh-llm-omp-transports` | Cursor, Devin and Google transport component |
|
|
318
355
|
|
|
319
356
|
The root package declares the transports package as a dependency, so the
|
|
320
357
|
published Keys Manager tarball pulls the transport in rather than vendoring
|
|
@@ -328,7 +365,7 @@ it. Both packages are released together and carry the same version; see
|
|
|
328
365
|
| [Development](docs/development.md) | build and dev workflow, repository layout |
|
|
329
366
|
| [Release](docs/release.md) | CI checks and the npm release flow |
|
|
330
367
|
| [Known limits](docs/known-limits.md) | current design boundaries, including deferred providers |
|
|
331
|
-
| [Transports package](packages/llm-omp/README.md) |
|
|
368
|
+
| [Transports package](packages/llm-omp/README.md) | Transport routes: support status, risks, build/test, release |
|
|
332
369
|
|
|
333
370
|
Chinese versions: [README.zh-CN.md](README.zh-CN.md) and the `*.zh-CN.md`
|
|
334
371
|
files in `docs/` — [开发](docs/development.zh-CN.md) ·
|
package/README.zh-CN.md
CHANGED
|
@@ -19,7 +19,7 @@ DSH Keys Manager 是一个 DeepSeek Harness 插件,把一个提供商 API key
|
|
|
19
19
|
- 既有 Models 提供商卡片内出现"由 Keys Manager 托管"徽标。
|
|
20
20
|
- 额外内置提供商以普通 `llm-pi-ai` 路由安装。
|
|
21
21
|
- 七家 pi-ai 覆盖的提供商支持 OAuth 账户登录,凭据与 API key 并存管理。
|
|
22
|
-
- 随插件附带一个传输组件,服务随附 pi-ai
|
|
22
|
+
- 随插件附带一个传输组件,服务随附 pi-ai 无法支持的提供商——共四条路由:Cursor(`cursor`)、Devin(`devin`)、Google Gemini CLI(`google-gemini-cli`)与 Google Antigravity(`google-antigravity`)。
|
|
23
23
|
|
|
24
24
|
### 额外提供商
|
|
25
25
|
|
|
@@ -87,7 +87,7 @@ CoreWeave Serverless Inference 还需在添加前把 `COREWEAVE_PROJECT=<team>/<
|
|
|
87
87
|
dsh plugin --profile web add dsh-keys-manager
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
安装 `dsh-keys-manager` 会安装两个 bundle 组件。已发布包依赖 `dsh-llm-omp-transports`,因此一次安装会解析两个 npm 包,插件页面会同时列出 `dsh-keys-manager` 与 `llm-omp-transports
|
|
90
|
+
安装 `dsh-keys-manager` 会安装两个 bundle 组件。已发布包依赖 `dsh-llm-omp-transports`,因此一次安装会解析两个 npm 包,插件页面会同时列出 `dsh-keys-manager` 与 `llm-omp-transports`。两者都要启用:管理器负责凭据与路由,传输组件负责其四条路由(Cursor、Devin 与两条 Google 路由)的线协议。
|
|
91
91
|
|
|
92
92
|
### 安装 —— 本地检出
|
|
93
93
|
|
|
@@ -133,6 +133,8 @@ dsh plugin --profile web link .
|
|
|
133
133
|
|
|
134
134
|
**登录流程不等于传输。** 这两条路由走常规 pi-ai key 池,参与会话粘滞、轮询、重试切换与冷却。下面描述的 `llm-omp-transports` 是另一套机制:每条路由一条授权,各自独立区块。
|
|
135
135
|
|
|
136
|
+
**`muse-code` 不需要传输。** 它已由随附 pi-ai 的 `meta` 路由提供(`openai-responses` 走 `https://api.meta.ai/v1`,目录键为 `meta`),因此按普通 pi-ai 提供商的路径管理即可。证明目录条目与提供商在该路由形态和凭据形态上一致的检查是静态的,没有发起真实请求;首次真实调用属于手动冒烟检查,详见[已知限制](docs/known-limits.zh-CN.md)。
|
|
137
|
+
|
|
136
138
|
### Cursor 传输
|
|
137
139
|
|
|
138
140
|
Cursor 由随附的 `dsh-llm-omp-transports` 组件在独立 `cursor` 路由上提供。它不经过 pi-ai key 池:该路由在 `llm-omp-transports/cursor` 只保留一条授权,并在凭据 seam 上自动刷新。
|
|
@@ -151,6 +153,15 @@ Devin 是同一个 `dsh-llm-omp-transports` 组件服务的第二条路由:独
|
|
|
151
153
|
- 模型来自固定的目录(两行:`swe-1-6` 与 `swe-1-6-fast`),构建时生成进传输包。
|
|
152
154
|
- 该客户端是非官方实现,呈现已发布的 Devin CLI 身份;真实端点与协议行为均未验证。依赖它之前请阅读[传输包的已知限制](packages/llm-omp/docs/known-limits.md)。
|
|
153
155
|
|
|
156
|
+
### Google 传输
|
|
157
|
+
|
|
158
|
+
两条 Google 路由由同一个 `dsh-llm-omp-transports` 组件提供。它们共用一份生成的 `lib/omp/google.mjs` 产物,由产物内的提供商按模型分派;除此之外两者彼此独立:`google-gemini-cli` 与 `google-antigravity` 各自在 `llm-omp-transports/<route>` 保留一条授权,各有独立的账户行与模型目录。
|
|
159
|
+
|
|
160
|
+
- 在 **传输账户**(`Transport accounts`)区块登录。该登录由插件自身完成:`127.0.0.1` 上的 `node:http` 监听器接收浏览器重定向(`google-gemini-cli` 用 `8085` 的 `/oauth2callback`,`google-antigravity` 用 `51121` 的 `/oauth-callback`;默认端口被占用时回落到其它空闲端口)。同一个对话框始终提供粘贴路径——粘贴浏览器最终落到的完整地址,或 `code#state`——用于浏览器无法访问该监听器的情形。
|
|
161
|
+
- 授权内容为 `{access, refresh, expires, projectId, email?}`,在凭据 seam 上刷新:刷新令牌仍有效时,过期的 access 令牌会自动续期而无需重新登录。登录过程还会解析该路由计费与请求所用的 Google Cloud 项目。
|
|
162
|
+
- 模型来自构建时固定的目录:`google-gemini-cli` 七行,`google-antigravity` 22 行。
|
|
163
|
+
- 两个客户端都是非官方实现,会呈现厂商内部的 OAuth 身份;两条路由的首次真实请求都是手动冒烟检查。依赖它们之前请阅读[已知限制](docs/known-limits.zh-CN.md),其中说明了监听器、antigravity 的版本读取以及 401/403 姿态。
|
|
164
|
+
|
|
154
165
|
### 选择与故障策略
|
|
155
166
|
|
|
156
167
|
- **会话粘滞**:会话的首次请求选出一把 key 并为该会话/提供商对绑定,后续请求复用。
|
|
@@ -203,7 +214,7 @@ $DSH_HOME/keys-manager/state.json
|
|
|
203
214
|
| 路径 | npm 包 | 职责 |
|
|
204
215
|
|---|---|---|
|
|
205
216
|
| 根目录 | `dsh-keys-manager` | Host 插件、Keys Manager Web 客户端、bundle patch |
|
|
206
|
-
| `packages/llm-omp` | `dsh-llm-omp-transports` | Cursor 与
|
|
217
|
+
| `packages/llm-omp` | `dsh-llm-omp-transports` | Cursor、Devin 与 Google 传输组件 |
|
|
207
218
|
|
|
208
219
|
根包把传输包声明为依赖,因此已发布的 Keys Manager tarball 会拉取传输包,而不是把它 vendor 进来。两个包一起发布且版本号一致,详见[发布](docs/release.zh-CN.md)。
|
|
209
220
|
|
|
@@ -214,7 +225,7 @@ $DSH_HOME/keys-manager/state.json
|
|
|
214
225
|
| [开发](docs/development.zh-CN.md) | 构建与开发工作流、仓库布局 |
|
|
215
226
|
| [发布](docs/release.zh-CN.md) | CI 检查与 npm 发布流程 |
|
|
216
227
|
| [已知限制](docs/known-limits.zh-CN.md) | 当前设计边界,含延后提供商 |
|
|
217
|
-
| [传输包(英文)](packages/llm-omp/README.md) |
|
|
228
|
+
| [传输包(英文)](packages/llm-omp/README.md) | 传输路由:支持状态、风险、构建/测试与发布 |
|
|
218
229
|
|
|
219
230
|
英文版本:[README.md](README.md) 及 `docs/` 下的 `*.md` —— [Development](docs/development.md) · [Release](docs/release.md) · [Known limits](docs/known-limits.md)。当前设计边界速览:[已知限制](docs/known-limits.zh-CN.md)。
|
|
220
231
|
|
package/lib/index.js
CHANGED
|
@@ -566,27 +566,39 @@ function transportMethodOf(flow) {
|
|
|
566
566
|
}
|
|
567
567
|
/** The `devin` transport route id (its catalog ships with the same package). */
|
|
568
568
|
const DEVIN_ROUTE = 'devin';
|
|
569
|
+
/**
|
|
570
|
+
* The catalog accessor each transport route ships in the transports package.
|
|
571
|
+
*
|
|
572
|
+
* One exported function per route, the `cursorCatalogModels`/`devinCatalogModels`
|
|
573
|
+
* shape. An installed transport build may predate the Google pair's exports, and
|
|
574
|
+
* `factory-droid` is probed while its route stays unshipped (`I-000253`), so a
|
|
575
|
+
* probe can legitimately find nothing.
|
|
576
|
+
*/
|
|
577
|
+
const TRANSPORT_CATALOG_EXPORTS = Object.freeze({
|
|
578
|
+
[DEVIN_ROUTE]: 'devinCatalogModels',
|
|
579
|
+
'google-gemini-cli': 'googleGeminiCliCatalogModels',
|
|
580
|
+
'google-antigravity': 'googleAntigravityCatalogModels',
|
|
581
|
+
'factory-droid': 'factoryDroidCatalogModels',
|
|
582
|
+
});
|
|
569
583
|
/**
|
|
570
584
|
* The catalog a transport route advertises to its model picker.
|
|
571
585
|
*
|
|
572
586
|
* A route without a catalog projection reports no models rather than borrowing
|
|
573
587
|
* another route's. The catalog is the transport package's own data, not this
|
|
574
|
-
* plugin's
|
|
575
|
-
* the installed transport build may predate its export. The function is
|
|
588
|
+
* plugin's, and the installed build may predate these exports. Each accessor is
|
|
576
589
|
* therefore probed on the module namespace instead of imported by name — an
|
|
577
590
|
* absent export yields an empty catalog instead of breaking this plugin's
|
|
578
591
|
* import graph. An empty list is indistinguishable from the legitimate
|
|
579
|
-
* all-models state, so `onMissing` reports it instead of the picker rendering
|
|
580
|
-
*
|
|
592
|
+
* all-models state, so `onMissing` reports it instead of the picker rendering a
|
|
593
|
+
* silent `[]`.
|
|
581
594
|
*/
|
|
582
595
|
function transportCatalogOf(route, onMissing) {
|
|
583
596
|
if (route === CURSOR_ROUTE)
|
|
584
597
|
return cursorCatalogModels();
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
const probe = transportModule.devinCatalogModels;
|
|
598
|
+
// Own keys only: a prototype-colliding id ("toString") must take the
|
|
599
|
+
// missing-catalog path, not read an inherited value as an export name.
|
|
600
|
+
const exportName = Object.hasOwn(TRANSPORT_CATALOG_EXPORTS, route) ? TRANSPORT_CATALOG_EXPORTS[route] : undefined;
|
|
601
|
+
const probe = exportName === undefined ? undefined : transportModule[exportName];
|
|
590
602
|
if (typeof probe !== 'function') {
|
|
591
603
|
onMissing?.(route);
|
|
592
604
|
return [];
|