dsh-connect-minimaxcode 0.5.0 → 0.5.2
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 +41 -7
- package/README.md +41 -7
- package/icon.svg +11 -0
- package/lib/client.js +45 -7
- package/lib/index.d.ts +3 -1
- package/lib/index.js +1 -1
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +7 -2
package/README.en.md
CHANGED
|
@@ -42,13 +42,14 @@ Another implementation in the same direction is **[dingminhua/dsh-connect-workbu
|
|
|
42
42
|
|
|
43
43
|
- **Zero configuration**: the login state of the MiniMax Code desktop app is read automatically, and no plaintext token is ever stored in DSH
|
|
44
44
|
- **Dynamic model catalog**: pulled live from the upstream API, so upstream adding or removing models needs no plugin update
|
|
45
|
-
- **Credit balance at a glance**: the pill
|
|
45
|
+
- **Credit balance at a glance**: the pill in the composer tool row (beside the model picker) shows the remaining MiniMax Code credits and the consumption accumulated on this machine
|
|
46
46
|
- **Live usage accounting**: the token usage of every request is taken from the upstream response itself, and can be converted to an equivalent cost using the official price list
|
|
47
47
|
- **Reuses the official adapter**: upstream speaks the standard Anthropic Messages protocol, so DSH's built-in provider is reused as is; tool calls, reasoning blocks and context compaction are all handled by DSH
|
|
48
48
|
- **Works without the desktop app**: the plugin can sign in on its own with the OAuth device code flow; you confirm in your own browser and the plugin never sees a password
|
|
49
49
|
- **Daily check-in**: MiniMax Code grants credits every day and the desktop app does **not** claim them for you; the plugin shows the seven-day cycle and can claim the day's grant
|
|
50
50
|
- **Read-mostly**: apart from "refreshing an expired desktop app login state" and the sign-in you start yourself, the plugin does not write to or modify any MiniMax file
|
|
51
|
-
- **
|
|
51
|
+
- **Follows the selected model**: the balance sits in the **composer tool row beside the model picker**, and is drawn **only while a MiniMax model is selected** — picking another connector's model hides it entirely instead of misleading you with MiniMax's balance
|
|
52
|
+
- **An icon and two languages of its own**: a 48×48 SVG ships with the package, so the plugin page no longer shows the default placeholder; the title and the introduction come in Chinese and English, and the interface follows the host's language
|
|
52
53
|
|
|
53
54
|
## Prerequisites
|
|
54
55
|
|
|
@@ -57,7 +58,7 @@ Either:
|
|
|
57
58
|
1. **The MiniMax Code desktop app (China region) installed and signed in** — the plugin reuses its sign-in (the easy way)
|
|
58
59
|
2. **Nothing installed** — press "Sign in to MiniMax Code" on the plugin page; the plugin starts an OAuth device code flow and you confirm with your own MiniMax account in a browser (this needs `account.minimax.cn` to be reachable)
|
|
59
60
|
|
|
60
|
-
Plus DSH desktop (built-in core in
|
|
61
|
+
Plus DSH desktop (built-in core `>=0.2.1-rc.2 <0.3.0`, see `engines.dsh` in `package.json`; tested on `0.2.1-rc.2`) or the Web profile.
|
|
61
62
|
|
|
62
63
|
## Installation
|
|
63
64
|
|
|
@@ -200,7 +201,7 @@ The automatic claim is deliberately restrained: it only asks when the upstream s
|
|
|
200
201
|
|
|
201
202
|
## Credit balance and usage
|
|
202
203
|
|
|
203
|
-
The pill
|
|
204
|
+
The pill in the composer tool row (beside the model picker) shows the **remaining MiniMax Code credits**; expanding it also shows the granted/purchased split, the consumption between the two reads, and the tokens and equivalent cost accumulated on this machine. The pill appears **only while a `minimaxcode` model is selected**.
|
|
204
205
|
|
|
205
206
|
### Where the balance comes from
|
|
206
207
|
|
|
@@ -243,7 +244,7 @@ GET https://agent.minimax.cn/minimax-cloud/api/v1/credit/details?page_number=1&p
|
|
|
243
244
|
|
|
244
245
|
Measured on this machine, 23 lots: the one granted on 09-20 expires on 10-20, the one granted on 09-21 expires on 10-21, and so on; one granted on 08-25 expires on 2027-08-25 (a one-year lot; `credit_type` 1 = purchased / 2 = check-in). **Always read the expiry date from `expire_at_ms`** instead of hardcoding a number of days — there are at least a 30-day and a 365-day scheme.
|
|
245
246
|
|
|
246
|
-
Based on that, the plugin shows, in the **plugin page** (Settings → Plugins → DSH Connect MiniMax Code) and in the pill
|
|
247
|
+
Based on that, the plugin shows, in the **plugin page** (Settings → Plugins → DSH Connect MiniMax Code) and in the pill in the composer tool row:
|
|
247
248
|
|
|
248
249
|
- The remaining credits **expiring within 7 days**, and the expiry date of the most recent lot
|
|
249
250
|
- The remaining credits **expiring within 30 days**
|
|
@@ -290,12 +291,24 @@ The OAuth token is valid for about an hour and is refreshed automatically by the
|
|
|
290
291
|
- **When the OAuth token expires the credit pill is temporarily unavailable**. With the desktop app's sign-in, open MiniMax Code once and let it refresh itself; with the plugin's own sign-in, the plugin renews it with its refresh token (the server rotates the refresh token, and the plugin writes the new pair back to its own file). This does not affect model traffic.
|
|
291
292
|
- **The check-in needs an account that is entitled to it.** The check-in is an upstream entitlement; the plugin only presses the button for you. When the server says "not claimable now", the plugin says so — it does not retry or work around it.
|
|
292
293
|
- **The automatic claim is off by default**, and it only asks when the server explicitly says the day can be claimed, at most once a day. Whether to turn it on, and whether that is within MiniMax's terms of service, is your call.
|
|
293
|
-
- **No settings card is provided**. The plugin does not register a card on the DSH settings page; the interface it adds is a single pill
|
|
294
|
+
- **No settings card is provided**. The plugin does not register a card on the DSH settings page; the interface it adds is a single pill in the composer tool row (**drawn only while this plugin's model is selected**) and a small card on the plugin page.
|
|
294
295
|
- **The upstream APIs are non-public** and may stop working when MiniMax updates its client. If the balance API breaks, the pill shows "credits unavailable", which does not affect model traffic.
|
|
295
296
|
- **The device code flow needs `account.minimax.cn` to be reachable**, and the browser that authorizes it has to be able to sign in to a MiniMax account. On some restricted networks the authorization page cannot be opened.
|
|
296
297
|
|
|
297
298
|
## Changelog
|
|
298
299
|
|
|
300
|
+
### 0.5.2 (2026-10-21)
|
|
301
|
+
|
|
302
|
+
- **An icon for the plugin page**: a new `icon.svg` (48×48, under 800 bytes) ships with the package, declared as `"icon": "./icon.svg"` in `package.json`. The host reads it as a data URL and draws it on the plugin page instead of the default placeholder.
|
|
303
|
+
- **Chinese and English title and introduction**: new `locale/en.json` and `locale/zh.json` (the host reads the language files in the package root's `locale/` directory, with the English file as the anchor). The plugin page used to show the package name `dsh-connect-minimaxcode` and the mixed-language description from package.json; the title is now `DSH Connect MiniMax Code` and the introduction comes in both languages.
|
|
304
|
+
- **The interface follows the host's language**: neither the composer nor the plugin-page slot carries a translator in its standard props, so the copy always came from the built-in Chinese fallback — Chinese labels even in an English host. The bound locale is now injected into both slots, so an English host shows English.
|
|
305
|
+
- `exports` gains `./locale/*` (the host resolves the language files through it) and `files` gains `locale` and `icon.svg`.
|
|
306
|
+
|
|
307
|
+
### 0.5.1 (2026-10-20)
|
|
308
|
+
|
|
309
|
+
- **The balance follows the selected model**: moved from the dock below the input box to the **composer tool row beside the model picker**, gated by the host's `modelSelection` projection — the readout is drawn **only while a `minimaxcode` model is selected**, and selecting another connector's model (workbuddy, for instance) hides it entirely, polling included (following `dsh-connect-trae`).
|
|
310
|
+
- **`engines.dsh` narrowed to `>=0.2.1-rc.2 <0.3.0-0`**: only the tier actually tested is claimed; the previous `>=0.1.7-rc.1` reached too far.
|
|
311
|
+
|
|
299
312
|
### 0.5.0 (2026-10-20)
|
|
300
313
|
|
|
301
314
|
- **Added "sign in on your own"**: the plugin can sign in to MiniMax Code with the OAuth device code flow, so it no longer depends on the desktop app being installed and signed in. You confirm in your own browser, the plugin never sees a password, and the credential lives in the plugin's own file rather than the client's directory.
|
|
@@ -341,9 +354,30 @@ For earlier versions, see [GitHub Releases](https://github.com/JeffTsuiCUG/dsh-c
|
|
|
341
354
|
|
|
342
355
|
The plugin ships an installable `dsh.bundle` manifest and is published to npm. The directory of the community plugin marketplace (`dshmarket`) is generated from the [Awesome DSH Plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) registry, and this plugin's listing has been submitted as PR [#8110](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/pull/8110). A draft and the operating notes are kept in the repository: [`awesome-dsh-plugin-submission/`](awesome-dsh-plugin-submission/).
|
|
343
356
|
|
|
357
|
+
**Other directories and marketplaces** (entries submitted or already listed, text refreshed to 0.5.1):
|
|
358
|
+
|
|
359
|
+
| Channel | State |
|
|
360
|
+
|---|---|
|
|
361
|
+
| [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) (the registry) | Listed; entry refresh PR [#8380](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/pull/8380) |
|
|
362
|
+
| [awesome-deepseek-harness](https://github.com/0xsline/awesome-deepseek-harness) | PR [#727](https://github.com/0xsline/awesome-deepseek-harness/pull/727) |
|
|
363
|
+
| [Awesome-DeepSeek-Harness-Plugins](https://github.com/Zhiyuan-Fan/Awesome-DeepSeek-Harness-Plugins) | PR [#92](https://github.com/Zhiyuan-Fan/Awesome-DeepSeek-Harness-Plugins/pull/92) |
|
|
364
|
+
| [dsh-suite](https://github.com/whyihaveyou/dsh-suite) | PR [#66](https://github.com/whyihaveyou/dsh-suite/pull/66) |
|
|
365
|
+
| [awesome-dsh-plugins](https://github.com/kejixiaoliang/awesome-dsh-plugins) | PR [#143](https://github.com/kejixiaoliang/awesome-dsh-plugins/pull/143) |
|
|
366
|
+
| [awesome-dsh-plugins](https://github.com/dshworks/awesome-dsh-plugins) | PR [#176](https://github.com/dshworks/awesome-dsh-plugins/pull/176) |
|
|
367
|
+
| [awesome-deepseek-harness](https://github.com/awesome-deepseekharness/awesome-deepseek-harness) | PR [#177](https://github.com/awesome-deepseekharness/awesome-deepseek-harness/pull/177) |
|
|
368
|
+
| [dsh-plugin-radar](https://github.com/AdamPlatin123/dsh-plugin-radar) | PR [#964](https://github.com/AdamPlatin123/dsh-plugin-radar/pull/964) |
|
|
369
|
+
| [dsh-community-plugins](https://github.com/zhu1090093659/dsh-community-plugins) | PR [#46](https://github.com/zhu1090093659/dsh-community-plugins/pull/46) |
|
|
370
|
+
| [dsh-plugin.org](https://github.com/dshplugin/dsh-plugin-hub) | Listed (automatic scan; the npm package shows up in the DSH plugin centre) |
|
|
371
|
+
| [dshbase](https://github.com/ylwl1997/dshbase) | Listed |
|
|
372
|
+
| [awesome-deepseek-harness-plugins](https://github.com/walkinglabs/awesome-deepseek-harness-plugins) | PR [#117](https://github.com/walkinglabs/awesome-deepseek-harness-plugins/pull/117) |
|
|
373
|
+
| [awesome-deepseek-harness](https://github.com/Dominic789654/awesome-deepseek-harness) | PR [#663](https://github.com/Dominic789654/awesome-deepseek-harness/pull/663) |
|
|
374
|
+
| [awesome-deepseek-harness-plugins](https://github.com/imsai-sh/awesome-deepseek-harness-plugins) | PR [#660](https://github.com/imsai-sh/awesome-deepseek-harness-plugins/pull/660) |
|
|
375
|
+
|
|
344
376
|
Marketplace screenshots are declared, per the current convention, by the **`screenshots.json` in the plugin's own repository root** (the registry's `data/screenshots.json` is a fallback from the old convention, and no new keys are added there). This repository **does not ship screenshots yet**, so the file does not exist; once there are some, put `screenshots.json` in the repository root (an array of relative image paths) and the marketplace card will pick them up.
|
|
345
377
|
|
|
346
|
-
>
|
|
378
|
+
> **Since 0.5.1 the readout lives in the composer tool row (beside the model picker) and is gated by the host's `modelSelection` projection**: the balance belongs to the provider the next request will actually use, so it sits where that selection is made — and it hides entirely, polling included, when another connector's model (workbuddy, for example) is selected. This follows `dsh-connect-trae`, whose `ComposerPointsGate` returns null for every provider but its own.
|
|
379
|
+
>
|
|
380
|
+
> The tool row is a shared slot and can in principle be crowded out (a sibling plugin lost a reading this way in `workbuddy` issue #62; trae's answer is a second seat). **This plugin registers the tool-row seat only**; the ambient dock is a proven fallback should crowding ever occur.
|
|
347
381
|
|
|
348
382
|
## Uninstall
|
|
349
383
|
|
package/README.md
CHANGED
|
@@ -42,13 +42,14 @@
|
|
|
42
42
|
|
|
43
43
|
- **零配置**:自动读取 MiniMax Code 桌面 App 的登录态,不在 DSH 中存储任何明文 Token
|
|
44
44
|
- **动态模型目录**:从上游接口实时拉取,模型增减无需更新插件
|
|
45
|
-
-
|
|
45
|
+
- **积分余额可见**:在输入框工具行(模型选择器旁)的胶囊里显示 MiniMax Code 的剩余积分,以及本机累计消耗
|
|
46
46
|
- **实时消耗统计**:每次请求的 token 用量取自上游响应本身,可按官方价目表折算等效金额
|
|
47
47
|
- **复用官方适配器**:上游为标准 Anthropic Messages 协议,直接复用 DSH 自带 provider,工具调用、推理块、上下文压缩均由 DSH 托管
|
|
48
48
|
- **不用装桌面 App 也能用**:插件可以自己走 OAuth 设备码流登录,你在自己的浏览器里确认即可,插件从不接触密码
|
|
49
49
|
- **每日签到**:MiniMax Code 每天送积分,客户端**不会自动领**;插件可以显示七天一签的进度,并代领当天的额度
|
|
50
50
|
- **只读为主**:除「续期已过期的桌面 App 登录态」和「你自己发起的登录」外,不写入、不修改 MiniMax 的任何文件
|
|
51
|
-
-
|
|
51
|
+
- **跟随所选模型**:余额显示在**输入框工具行(模型选择器旁)**,且**只在选中 MiniMax 模型时出现** —— 切到其他反代插件的模型就整体隐藏,不会拿着 MiniMax 的余额误导你
|
|
52
|
+
- **插件页有自己的图标与中英文**:随包发布一张 48×48 的 SVG,插件页不再显示默认占位图;标题与简介按宿主语言给中英文两版,界面文案也跟着宿主语言走
|
|
52
53
|
|
|
53
54
|
## 前置条件
|
|
54
55
|
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
1. **已安装并登录 MiniMax Code 桌面 App(国内版)** —— 插件直接复用它的登录态(最省事)
|
|
58
59
|
2. **什么都不装** —— 在插件页面点「登录 MiniMax Code」,插件发起 OAuth 设备码流,你在浏览器里用自己的 MiniMax 账号确认,插件拿到自己的登录态(需要能访问 `account.minimax.cn`)
|
|
59
60
|
|
|
60
|
-
另外需要 DSH 桌面版(内置内核
|
|
61
|
+
另外需要 DSH 桌面版(内置内核 `>=0.2.1-rc.2 <0.3.0`,见 `package.json` 的 `engines.dsh`;实测 `0.2.1-rc.2`)或 Web profile。
|
|
61
62
|
|
|
62
63
|
## 安装
|
|
63
64
|
|
|
@@ -206,7 +207,7 @@ POST /minimax-cloud/api/v1/signin/claim?timezone_id=Asia/Shanghai # 领取当
|
|
|
206
207
|
|
|
207
208
|
## 积分余额与用量
|
|
208
209
|
|
|
209
|
-
|
|
210
|
+
输入框工具行(模型选择器旁)的胶囊会显示 MiniMax Code 的**剩余积分**;点开还能看到赠送/购买拆分、两次读取之间的消耗,以及本机累计的 token 与等效金额。胶囊**只在选中 `minimaxcode` 模型时出现**。
|
|
210
211
|
|
|
211
212
|
### 余额从哪里来
|
|
212
213
|
|
|
@@ -249,7 +250,7 @@ GET https://agent.minimax.cn/minimax-cloud/api/v1/credit/details?page_number=1&p
|
|
|
249
250
|
|
|
250
251
|
实测本机 23 笔:09-20 发的在 10-20 到期、09-21 发的在 10-21 到期……另有一笔 08-25 发的在 2027-08-25 到期(一年期批次,`credit_type` 1=购买 / 2=签到)。**到期日一律读 `expire_at_ms`**,不写死天数——至少存在 30 天与 365 天两种制式。
|
|
251
252
|
|
|
252
|
-
插件据此在**插件页面**(设置 → 插件 → DSH Connect MiniMax Code
|
|
253
|
+
插件据此在**插件页面**(设置 → 插件 → DSH Connect MiniMax Code)与输入框工具行的胶囊里给出:
|
|
253
254
|
|
|
254
255
|
- **7 天内到期**的剩余积分,以及最近一笔的到期日
|
|
255
256
|
- **30 天内到期**的剩余积分
|
|
@@ -296,12 +297,24 @@ OAuth 令牌有效期约 1 小时,由客户端自动续期。插件**只在自
|
|
|
296
297
|
- **OAuth 令牌过期时积分胶囊会暂时失效**。复用桌面 App 登录态时,打开一次 MiniMax Code 让它自行续期即可;用插件自己登录的,插件会用自己的 refresh token 续期(服务端会轮转 refresh token,插件会把新的一对写回自己的文件)。这不影响模型对话。
|
|
297
298
|
- **签到需要账号能领**。签到是上游给账号的权益,插件只是替你按那个按钮;服务端判定「暂不可签到」时插件只会如实显示,不会重试或绕过。
|
|
298
299
|
- **自动签到默认关闭**,且只在服务端明确说「当天可领」时才发请求、每天至多一次。是否开启、以及这样做是否符合 MiniMax 的服务条款,请自行判断。
|
|
299
|
-
- **不提供设置界面卡片**。插件不在 DSH
|
|
300
|
+
- **不提供设置界面卡片**。插件不在 DSH 设置页注册卡片;界面只在输入框工具行增加一枚胶囊(**仅选中本插件的模型时显示**),以及插件页面里的一张小卡片。
|
|
300
301
|
- **上游接口非公开**,MiniMax 客户端更新后可能失效。余额接口失效时胶囊会显示「积分不可用」,不会影响模型对话。
|
|
301
302
|
- **设备码流需要能访问 `account.minimax.cn`**,且授权时要在浏览器里能登录 MiniMax 账号。某些内网或受限网络下打不开授权页。
|
|
302
303
|
|
|
303
304
|
## 更新记录
|
|
304
305
|
|
|
306
|
+
### 0.5.2(2026-10-21)
|
|
307
|
+
|
|
308
|
+
- **插件页图标**:新增随包发布的 `icon.svg`(48×48,800 字节内),并在 `package.json` 里声明 `"icon": "./icon.svg"`。宿主会把它读成 data URL 画在插件页卡片上,不再是默认占位图。
|
|
309
|
+
- **插件页标题与简介的中英文**:新增 `locale/en.json` 与 `locale/zh.json`(宿主按包根 `locale/` 目录里的语言文件读取,英文文件是基准)。此前插件页显示的是包名 `dsh-connect-minimaxcode` 和 package.json 里那句中英混排的描述;现在标题是 `DSH Connect MiniMax Code`,简介按宿主语言给中/英两版。
|
|
310
|
+
- **界面文案跟随宿主语言**:此前两个插槽都拿不到翻译函数(composer 与 plugin-page 插槽的 standardProps 里没有 `t`),所以界面永远走内置中文兜底,英文界面下也是中文。现在改为 `locale.bind()` 之后经插槽的 `inject` 传进去,英文界面显示英文。
|
|
311
|
+
- `exports` 增加 `./locale/*`(宿主要通过它解析语言包),`files` 增加 `locale` 与 `icon.svg`。
|
|
312
|
+
|
|
313
|
+
### 0.5.1(2026-10-20)
|
|
314
|
+
|
|
315
|
+
- **余额读数跟随所选模型**:从输入框下方的 dock 移到**输入框工具行(模型选择器旁)**,并按宿主 `modelSelection` 投影门控 —— **只有选中 `minimaxcode` 模型时才显示**;切到其他反代插件(如 workbuddy)的模型即整体隐藏,且不轮询(学习 `dsh-connect-trae` 的做法)。
|
|
316
|
+
- **`engines.dsh` 收窄为 `>=0.2.1-rc.2 <0.3.0-0`**:只声明实测过的档位,此前的 `>=0.1.7-rc.1` 覆盖过宽。
|
|
317
|
+
|
|
305
318
|
### 0.5.0(2026-10-20)
|
|
306
319
|
|
|
307
320
|
- **新增「自己登录」**:插件可以自己走 OAuth 设备码流登录 MiniMax Code,**不再依赖本机已安装并登录的桌面 App**。你在自己的浏览器里确认,插件不接触密码;凭据存在插件自己的文件里,不写客户端的目录。
|
|
@@ -347,9 +360,30 @@ OAuth 令牌有效期约 1 小时,由客户端自动续期。插件**只在自
|
|
|
347
360
|
|
|
348
361
|
插件已包含可安装的 `dsh.bundle` manifest,并发布到 npm。社区插件市场(`dshmarket`)的目录由 [Awesome DSH Plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) 注册表生成,本插件的收录条目已提交为 PR [#8110](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/pull/8110),仓库内保留了一份草稿与操作说明:[`awesome-dsh-plugin-submission/`](awesome-dsh-plugin-submission/)。
|
|
349
362
|
|
|
363
|
+
**其它目录 / 市场的收录**(条目已提交或已上线,内容随版本更新到 0.5.1):
|
|
364
|
+
|
|
365
|
+
| 渠道 | 状态 |
|
|
366
|
+
|---|---|
|
|
367
|
+
| [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin)(官方注册表) | ✅ 已收录;条目更新 PR [#8380](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/pull/8380) |
|
|
368
|
+
| [awesome-deepseek-harness](https://github.com/0xsline/awesome-deepseek-harness) | PR [#727](https://github.com/0xsline/awesome-deepseek-harness/pull/727) |
|
|
369
|
+
| [Awesome-DeepSeek-Harness-Plugins](https://github.com/Zhiyuan-Fan/Awesome-DeepSeek-Harness-Plugins) | PR [#92](https://github.com/Zhiyuan-Fan/Awesome-DeepSeek-Harness-Plugins/pull/92) |
|
|
370
|
+
| [dsh-suite](https://github.com/whyihaveyou/dsh-suite) | PR [#66](https://github.com/whyihaveyou/dsh-suite/pull/66) |
|
|
371
|
+
| [awesome-dsh-plugins](https://github.com/kejixiaoliang/awesome-dsh-plugins) | PR [#143](https://github.com/kejixiaoliang/awesome-dsh-plugins/pull/143) |
|
|
372
|
+
| [awesome-dsh-plugins](https://github.com/dshworks/awesome-dsh-plugins) | PR [#176](https://github.com/dshworks/awesome-dsh-plugins/pull/176) |
|
|
373
|
+
| [awesome-deepseek-harness](https://github.com/awesome-deepseekharness/awesome-deepseek-harness) | PR [#177](https://github.com/awesome-deepseekharness/awesome-deepseek-harness/pull/177) |
|
|
374
|
+
| [dsh-plugin-radar](https://github.com/AdamPlatin123/dsh-plugin-radar) | PR [#964](https://github.com/AdamPlatin123/dsh-plugin-radar/pull/964) |
|
|
375
|
+
| [dsh-community-plugins](https://github.com/zhu1090093659/dsh-community-plugins) | PR [#46](https://github.com/zhu1090093659/dsh-community-plugins/pull/46) |
|
|
376
|
+
| [dsh-plugin.org](https://github.com/dshplugin/dsh-plugin-hub) | ✅ 已收录(自助扫描,会随目录更新出现在 DSH「插件中心」) |
|
|
377
|
+
| [dshbase](https://github.com/ylwl1997/dshbase) | ✅ 已收录 |
|
|
378
|
+
| [awesome-deepseek-harness-plugins](https://github.com/walkinglabs/awesome-deepseek-harness-plugins) | PR [#117](https://github.com/walkinglabs/awesome-deepseek-harness-plugins/pull/117) |
|
|
379
|
+
| [awesome-deepseek-harness](https://github.com/Dominic789654/awesome-deepseek-harness) | PR [#663](https://github.com/Dominic789654/awesome-deepseek-harness/pull/663) |
|
|
380
|
+
| [awesome-deepseek-harness-plugins](https://github.com/imsai-sh/awesome-deepseek-harness-plugins) | PR [#660](https://github.com/imsai-sh/awesome-deepseek-harness-plugins/pull/660) |
|
|
381
|
+
|
|
350
382
|
市场截图按当前约定由**插件自己仓库根目录的** `screenshots.json` 声明(注册表 `data/screenshots.json` 是旧约定下的回退,不再新增键)。本仓库目前**尚未提供截图**,所以还没有这个文件;补上截图后,在根目录放 `screenshots.json`(内容是图片相对路径的数组)即可被市场卡片取用。
|
|
351
383
|
|
|
352
|
-
>
|
|
384
|
+
> **0.5.1 起,读数移到输入框工具行(模型选择器旁)并按宿主 `modelSelection` 投影做门控**:余额属于「下一次请求真正会用的那个 provider」,所以它既该待在选模型的地方,也该在选中别的反代插件(如 workbuddy)时**整体隐藏、且不发轮询请求**——这是学习 `dsh-connect-trae` 的做法(其 `ComposerPointsGate` 对非自家 provider 一律 `return null`)。
|
|
385
|
+
>
|
|
386
|
+
> 工具行是共享插槽,理论上可能被其它插件挤掉(同族 `workbuddy` issue #62 就丢过一次读数,trae 的解法是双座位)。**本插件目前只注册工具行一个座位**;若真被挤掉,dock 常驻行是已验证的备选方案。
|
|
353
387
|
|
|
354
388
|
## 卸载
|
|
355
389
|
|
package/icon.svg
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="48" height="48" role="img" aria-label="DSH Connect MiniMax Code">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#4f46e5"/>
|
|
5
|
+
<stop offset="1" stop-color="#7c3aed"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect x="2" y="2" width="44" height="44" rx="11" fill="url(#bg)"/>
|
|
9
|
+
<path d="M14 33V17l10 9 10-9v16" fill="none" stroke="#ffffff" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
10
|
+
<circle cx="36" cy="13" r="2.4" fill="#fbbf24"/>
|
|
11
|
+
</svg>
|
package/lib/client.js
CHANGED
|
@@ -20,6 +20,13 @@
|
|
|
20
20
|
const STATUS_PATH = '/plugins/dsh-connect-minimaxcode/status';
|
|
21
21
|
const ACTION_PATH = '/plugins/dsh-connect-minimaxcode/action';
|
|
22
22
|
const POLL_INTERVAL_MS = 20000;
|
|
23
|
+
/**
|
|
24
|
+
* The provider id the host side registers with `llm.registerAdapter`.
|
|
25
|
+
*
|
|
26
|
+
* Duplicated here on purpose: this half is a classic script that cannot
|
|
27
|
+
* import the host's module, and the id is the one the projection reports.
|
|
28
|
+
*/
|
|
29
|
+
const MINIMAX_PROVIDER_ID = 'minimaxcode';
|
|
23
30
|
const zh = {
|
|
24
31
|
title: 'MiniMax Code 积分',
|
|
25
32
|
balance: '积分 {total}',
|
|
@@ -201,7 +208,7 @@
|
|
|
201
208
|
? row(t('expiringSoon', { amount: credits(credits_.expiringSoon, 2) }), '')
|
|
202
209
|
: null, next !== undefined ? row(t('nextExpiry'), day(next)) : null);
|
|
203
210
|
}
|
|
204
|
-
/** The pill
|
|
211
|
+
/** The pill itself; the gate decides whether it is drawn at all. */
|
|
205
212
|
function CreditPill(props) {
|
|
206
213
|
const [status] = useStatus();
|
|
207
214
|
const [open, setOpen] = React.useState(false);
|
|
@@ -231,6 +238,27 @@
|
|
|
231
238
|
onClick: () => setOpen(!open),
|
|
232
239
|
}, label), open ? detail : null);
|
|
233
240
|
}
|
|
241
|
+
/**
|
|
242
|
+
* The pill, only while this plugin's own provider is selected.
|
|
243
|
+
*
|
|
244
|
+
* The balance belongs to the provider the next request will actually
|
|
245
|
+
* use, so another connector's model means this balance is the wrong
|
|
246
|
+
* number to show: the gate hides the readout and — because the pill is
|
|
247
|
+
* the only subscriber — the polling stops with it. The projection comes
|
|
248
|
+
* from the host's own `modelSelection`, which is what the model picker
|
|
249
|
+
* writes, so the readout cannot disagree with the model in effect.
|
|
250
|
+
*
|
|
251
|
+
* A host without the projection, or a session where the picker has not
|
|
252
|
+
* chosen yet, keeps the pill: "I do not know" must not hide a balance
|
|
253
|
+
* that is true either way.
|
|
254
|
+
*/
|
|
255
|
+
function CreditPillGate(props) {
|
|
256
|
+
const projection = props.useProjection?.('modelSelection');
|
|
257
|
+
const provider = (projection?.next ?? projection?.lastUsed)?.provider;
|
|
258
|
+
if (provider !== undefined && provider !== MINIMAX_PROVIDER_ID)
|
|
259
|
+
return null;
|
|
260
|
+
return h(CreditPill, props);
|
|
261
|
+
}
|
|
234
262
|
/** Ask the host to do something, and let the card read the result. */
|
|
235
263
|
async function act(action, body) {
|
|
236
264
|
try {
|
|
@@ -452,20 +480,30 @@
|
|
|
452
480
|
const context = ctx;
|
|
453
481
|
// Visible text goes through the host's locale service.
|
|
454
482
|
context.effect(() => context.locale.register(NAMESPACE, { zh, en }), `${BUNDLE_NAME}: locale`);
|
|
455
|
-
// The composer
|
|
456
|
-
//
|
|
457
|
-
|
|
458
|
-
|
|
483
|
+
// The composer and plugin-page slots carry no translator in their
|
|
484
|
+
// standard props, so the bound one is injected into both. Without
|
|
485
|
+
// this the components fall back to their own Chinese copy and an
|
|
486
|
+
// English host shows Chinese labels.
|
|
487
|
+
const t = context.locale.bind(NAMESPACE);
|
|
488
|
+
// The tool row to the left of the composer — beside the model
|
|
489
|
+
// picker — rather than the ambient strip below it: the balance
|
|
490
|
+
// belongs to the provider that is selected, so it sits where that
|
|
491
|
+
// selection is made, and the gate hides it when another connector's
|
|
492
|
+
// model is in effect.
|
|
493
|
+
context.slots.inject('conversation.input.left', () => context.slots.register({
|
|
494
|
+
name: 'conversation.input.left',
|
|
459
495
|
id: 'minimax-credits',
|
|
460
|
-
order:
|
|
496
|
+
order: 4,
|
|
461
497
|
locale: NAMESPACE,
|
|
462
|
-
|
|
498
|
+
inject: () => ({ t }),
|
|
499
|
+
}, CreditPillGate));
|
|
463
500
|
// The plugin's own page, keyed by the package name, where the
|
|
464
501
|
// balance and the expiry schedule are spelled out.
|
|
465
502
|
context.slots.inject('plugins.bundle.config', () => context.slots.register({
|
|
466
503
|
name: 'plugins.bundle.config',
|
|
467
504
|
key: BUNDLE_NAME,
|
|
468
505
|
locale: NAMESPACE,
|
|
506
|
+
inject: () => ({ t }),
|
|
469
507
|
}, PluginPage));
|
|
470
508
|
},
|
|
471
509
|
};
|
package/lib/index.d.ts
CHANGED
|
@@ -719,6 +719,8 @@ declare function localDay(now?: number, timezone?: string): string;
|
|
|
719
719
|
//#region src/status-route.d.ts
|
|
720
720
|
/** Route this plugin mounts, matching its settings card. */
|
|
721
721
|
declare const MINIMAX_STATUS_PATH = "/plugins/dsh-connect-minimaxcode/status";
|
|
722
|
+
/** Route the card posts to when it wants something done rather than read. */
|
|
723
|
+
declare const MINIMAX_ACTION_PATH = "/plugins/dsh-connect-minimaxcode/action";
|
|
722
724
|
/** The daily check-in, as the card reads it. */
|
|
723
725
|
interface SigninStatus {
|
|
724
726
|
/** Whether the cycle could be read. */
|
|
@@ -949,4 +951,4 @@ declare const inject: string[];
|
|
|
949
951
|
*/
|
|
950
952
|
declare function apply(ctx: Context): void;
|
|
951
953
|
//#endregion
|
|
952
|
-
export { type AuthState, type CatalogModel, type CatalogSource, type Credential, type CreditSummary, DEVICE_CODE_GRANT, DEVICE_CODE_PATH, type DeviceLoginState, EMPTY_USAGE, FALLBACK_MODELS, MEMBERSHIP_PATH, MINIMAXCODE_PROVIDER_ID, MINIMAX_AUTH_FILENAME, MINIMAX_DATA_DIR, MINIMAX_GATEWAYS, MINIMAX_OAUTH_CLIENT_ID, MINIMAX_REGIONS, MINIMAX_STATUS_PATH, MINIMAX_STREAM_IDLE_TIMEOUT_MS, MODEL_PRICES, MinimaxCatalog, MinimaxCredits, type MinimaxRegion, type ModelUsage, type OAuthCredential, type OAuthState, PLUGIN_CREDENTIAL_FILENAME, PLUGIN_STATE_FILENAME, type PluginCredential, type PluginState, SIGNIN_CLAIM_PATH, SIGNIN_CLAIM_RESULT, SIGNIN_CYCLE_DAYS, SIGNIN_DAY_STATUS, SIGNIN_PANEL_PATH, type SigninClaim, type SigninDay, type SigninPanel, type StatusDocument, type TokenClaims, UsageMeter, apply, authPath, bearerToken, catalogUrl, chatBaseUrl, claimSignin, createMinimaxCodeAdapter, dataDir, daysRemaining, decodeClaims, dshHome, ensureOAuthCredential, estimateCny, expiresInMs, expiryLevel, fetchCreditSummary, fetchSigninPanel, inject, localDay, makePkce, name, parseAuthDocument, parseCatalog, parseCreditSummary, parseOAuthDocument, parseSigninClaim, parseSigninPanel, pluginCredentialPath, pluginStatePath, pollDeviceLogin, priceFor, readCredential, readOAuthCredential, readPluginCredential, readPluginState, refreshOAuthCredential, refreshPluginCredential, startDeviceLogin, statusDocument, timezoneId, writeOAuthCredential, writePluginCredential, writePluginState };
|
|
954
|
+
export { type AuthState, type CatalogModel, type CatalogSource, type Credential, type CreditSummary, DEVICE_CODE_GRANT, DEVICE_CODE_PATH, type DeviceLoginState, EMPTY_USAGE, FALLBACK_MODELS, MEMBERSHIP_PATH, MINIMAXCODE_PROVIDER_ID, MINIMAX_ACTION_PATH, MINIMAX_AUTH_FILENAME, MINIMAX_DATA_DIR, MINIMAX_GATEWAYS, MINIMAX_OAUTH_CLIENT_ID, MINIMAX_REGIONS, MINIMAX_STATUS_PATH, MINIMAX_STREAM_IDLE_TIMEOUT_MS, MODEL_PRICES, MinimaxCatalog, MinimaxCredits, type MinimaxRegion, type ModelUsage, type OAuthCredential, type OAuthState, PLUGIN_CREDENTIAL_FILENAME, PLUGIN_STATE_FILENAME, type PluginCredential, type PluginState, SIGNIN_CLAIM_PATH, SIGNIN_CLAIM_RESULT, SIGNIN_CYCLE_DAYS, SIGNIN_DAY_STATUS, SIGNIN_PANEL_PATH, type SigninClaim, type SigninDay, type SigninPanel, type StatusDocument, type TokenClaims, UsageMeter, apply, authPath, bearerToken, catalogUrl, chatBaseUrl, claimSignin, createMinimaxCodeAdapter, dataDir, daysRemaining, decodeClaims, dshHome, ensureOAuthCredential, estimateCny, expiresInMs, expiryLevel, fetchCreditSummary, fetchSigninPanel, inject, localDay, makePkce, name, parseAuthDocument, parseCatalog, parseCreditSummary, parseOAuthDocument, parseSigninClaim, parseSigninPanel, pluginCredentialPath, pluginStatePath, pollDeviceLogin, priceFor, readCredential, readOAuthCredential, readPluginCredential, readPluginState, refreshOAuthCredential, refreshPluginCredential, startDeviceLogin, statusDocument, timezoneId, writeOAuthCredential, writePluginCredential, writePluginState };
|
package/lib/index.js
CHANGED
|
@@ -2383,4 +2383,4 @@ async function readRequestBody(req) {
|
|
|
2383
2383
|
return text;
|
|
2384
2384
|
}
|
|
2385
2385
|
//#endregion
|
|
2386
|
-
export { DEVICE_CODE_GRANT, DEVICE_CODE_PATH, EMPTY_USAGE, FALLBACK_MODELS, MEMBERSHIP_PATH, MINIMAXCODE_PROVIDER_ID, MINIMAX_AUTH_FILENAME, MINIMAX_DATA_DIR, MINIMAX_GATEWAYS, MINIMAX_OAUTH_CLIENT_ID, MINIMAX_REGIONS, MINIMAX_STATUS_PATH, MINIMAX_STREAM_IDLE_TIMEOUT_MS, MODEL_PRICES, MinimaxCatalog, MinimaxCredits, PLUGIN_CREDENTIAL_FILENAME, PLUGIN_STATE_FILENAME, SIGNIN_CLAIM_PATH, SIGNIN_CLAIM_RESULT, SIGNIN_CYCLE_DAYS, SIGNIN_DAY_STATUS, SIGNIN_PANEL_PATH, UsageMeter, apply, authPath, bearerToken, catalogUrl, chatBaseUrl, claimSignin, createMinimaxCodeAdapter, dataDir, daysRemaining, decodeClaims, dshHome, ensureOAuthCredential, estimateCny, expiresInMs, expiryLevel, fetchCreditSummary, fetchSigninPanel, inject, localDay, makePkce, name, parseAuthDocument, parseCatalog, parseCreditSummary, parseOAuthDocument, parseSigninClaim, parseSigninPanel, pluginCredentialPath, pluginStatePath, pollDeviceLogin, priceFor, readCredential, readOAuthCredential, readPluginCredential, readPluginState, refreshOAuthCredential, refreshPluginCredential, startDeviceLogin, statusDocument, timezoneId, writeOAuthCredential, writePluginCredential, writePluginState };
|
|
2386
|
+
export { DEVICE_CODE_GRANT, DEVICE_CODE_PATH, EMPTY_USAGE, FALLBACK_MODELS, MEMBERSHIP_PATH, MINIMAXCODE_PROVIDER_ID, MINIMAX_ACTION_PATH, MINIMAX_AUTH_FILENAME, MINIMAX_DATA_DIR, MINIMAX_GATEWAYS, MINIMAX_OAUTH_CLIENT_ID, MINIMAX_REGIONS, MINIMAX_STATUS_PATH, MINIMAX_STREAM_IDLE_TIMEOUT_MS, MODEL_PRICES, MinimaxCatalog, MinimaxCredits, PLUGIN_CREDENTIAL_FILENAME, PLUGIN_STATE_FILENAME, SIGNIN_CLAIM_PATH, SIGNIN_CLAIM_RESULT, SIGNIN_CYCLE_DAYS, SIGNIN_DAY_STATUS, SIGNIN_PANEL_PATH, UsageMeter, apply, authPath, bearerToken, catalogUrl, chatBaseUrl, claimSignin, createMinimaxCodeAdapter, dataDir, daysRemaining, decodeClaims, dshHome, ensureOAuthCredential, estimateCny, expiresInMs, expiryLevel, fetchCreditSummary, fetchSigninPanel, inject, localDay, makePkce, name, parseAuthDocument, parseCatalog, parseCreditSummary, parseOAuthDocument, parseSigninClaim, parseSigninPanel, pluginCredentialPath, pluginStatePath, pollDeviceLogin, priceFor, readCredential, readOAuthCredential, readPluginCredential, readPluginState, refreshOAuthCredential, refreshPluginCredential, startDeviceLogin, statusDocument, timezoneId, writeOAuthCredential, writePluginCredential, writePluginState };
|
package/locale/en.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "DSH Connect MiniMax Code",
|
|
4
|
+
"description": "Bring the MiniMax Code models into DSH: reuse the desktop app's sign-in or sign in on your own with an OAuth device code, and get a live model catalog, the daily check-in, and a credit balance that follows the model you selected."
|
|
5
|
+
}
|
|
6
|
+
}
|
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "dsh-connect-minimaxcode",
|
|
3
3
|
"displayName": "DSH Connect MiniMax Code",
|
|
4
4
|
"description": "把本机已登录的 MiniMax Code 桌面 App 模型接入 DeepSeek Harness:零配置、Anthropic Messages 兼容、动态模型目录,并显示积分余额与到期 — bring MiniMax Code desktop app models into DSH with a dynamic model catalog and a credit balance with expiry details.",
|
|
5
|
-
"version": "0.5.
|
|
5
|
+
"version": "0.5.2",
|
|
6
6
|
"author": "JeffTsuiCUG",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"private": false,
|
|
@@ -21,8 +21,9 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": "^22.19.0 || >=24.0.0",
|
|
24
|
-
"dsh": ">=0.1
|
|
24
|
+
"dsh": ">=0.2.1-rc.2 <0.3.0-0"
|
|
25
25
|
},
|
|
26
|
+
"icon": "./icon.svg",
|
|
26
27
|
"main": "lib/index.js",
|
|
27
28
|
"types": "lib/index.d.ts",
|
|
28
29
|
"exports": {
|
|
@@ -32,10 +33,14 @@
|
|
|
32
33
|
},
|
|
33
34
|
"./client": "./lib/client.js",
|
|
34
35
|
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
36
|
+
"./icon.svg": "./icon.svg",
|
|
37
|
+
"./locale/*": "./locale/*",
|
|
35
38
|
"./package.json": "./package.json"
|
|
36
39
|
},
|
|
37
40
|
"files": [
|
|
38
41
|
"lib",
|
|
42
|
+
"locale",
|
|
43
|
+
"icon.svg",
|
|
39
44
|
"cordis.patch.yml",
|
|
40
45
|
"README.md",
|
|
41
46
|
"LICENSE"
|