dsh-connect-minimaxcode 0.6.3 → 0.6.4
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 +6 -0
- package/README.md +6 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.js +44 -0
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -384,6 +384,12 @@ The OAuth token is valid for about an hour and is refreshed automatically by the
|
|
|
384
384
|
|
|
385
385
|
## Changelog
|
|
386
386
|
|
|
387
|
+
### 0.6.4 (2026-11-11)
|
|
388
|
+
|
|
389
|
+
- **Fixed "the self-check report never appeared"**: the previous version put the self-check in the client half (the card reports what the host offered), but **the server half was never landed** — the status document had no field to carry the report and no route to receive it, so the card reported into nowhere. It is complete now: the report is received by the plugin's own route and appears in the status document as `capability`.
|
|
390
|
+
- The episode also exposed a process problem: a few anchors in the patch script missed, and its output was covered by another script in the same command, so a partial application was read as a complete one. **Every patch is now checked individually**, and an end-to-end check was added: the report counts as working only once it has travelled from the card through the route and back into the status document.
|
|
391
|
+
- The route-count cases were brought up to date (the host now mounts four routes: status, action, capability, generation).
|
|
392
|
+
|
|
387
393
|
### 0.6.3 (2026-11-11)
|
|
388
394
|
|
|
389
395
|
- **"Could not send it to the conversation" now names the missing piece**: delivering a picture needs several pieces of the host — the session identifier, the sessions service, the session binding, a way to send or to hold a draft, and the input box's attachment channel — and they arrive in different ways. There used to be one blanket failure message; each absence now has its own: the host named no session / offers no sessions service / this session is not reachable / it cannot send / it cannot hold drafts / the input box takes no attachments.
|
package/README.md
CHANGED
|
@@ -395,6 +395,12 @@ OAuth 令牌有效期约 1 小时,由客户端自动续期。插件**只在自
|
|
|
395
395
|
|
|
396
396
|
## 更新记录
|
|
397
397
|
|
|
398
|
+
### 0.6.4(2026-11-11)
|
|
399
|
+
|
|
400
|
+
- **修复「自检报告从未出现」**:上一版把自检能力加在了客户端(卡片上报宿主提供了什么),但**服务端那一半没有落地** —— 状态文档里没有承载报告的字段,也没有接收报告的路由,于是卡片上报到哪里都无人接收。现已补齐:报告由插件自己的路由接收,并出现在状态文档的 `capability` 里。
|
|
401
|
+
- 这次同时暴露了一个流程问题:补丁脚本里有几处锚点未命中,而脚本的输出被同一条命令里的另一个脚本盖住了,于是「部分应用」被当成了「全部应用」。**现在每一处补丁的成败都单独核对**,并且加了端到端验证:报告从卡片出发、经路由回到状态文档,全程贯通才算通过。
|
|
402
|
+
- 顺带补上路由数量的用例(宿主侧现在有四条路由:状态、动作、自检、生成)。
|
|
403
|
+
|
|
398
404
|
### 0.6.3(2026-11-11)
|
|
399
405
|
|
|
400
406
|
- **「无法发送到对话」现在会说明缺哪一步**:把图片送进对话需要宿主的好几块能力(会话标识、会话服务、会话绑定、发送或草稿通道、输入框的附件通道),它们分别以不同方式交到插件手上。原先只有一句笼统的失败提示,现在每种缺失都有各自的话:宿主没给会话标识 / 没有会话服务 / 当前会话不可达 / 会话不支持发送 / 不支持草稿 / 输入框不接受附件。
|
package/lib/index.d.ts
CHANGED
|
@@ -1087,6 +1087,13 @@ interface StatusDocument {
|
|
|
1087
1087
|
usageProfile?: UsageProfileStatus;
|
|
1088
1088
|
/** The choices the generation endpoints offer. */
|
|
1089
1089
|
generation?: GenerationOptions;
|
|
1090
|
+
/** What the host offered the card the last time it looked. */
|
|
1091
|
+
capability?: {
|
|
1092
|
+
/** When the card reported it. */
|
|
1093
|
+
at: number;
|
|
1094
|
+
/** One entry per piece the card looked for. */
|
|
1095
|
+
findings: Record<string, string>;
|
|
1096
|
+
};
|
|
1090
1097
|
}
|
|
1091
1098
|
/** Inputs the document is derived from. */
|
|
1092
1099
|
interface StatusDeps {
|
|
@@ -1119,6 +1126,13 @@ interface StatusDeps {
|
|
|
1119
1126
|
usageProfile?: UsageProfileStatus;
|
|
1120
1127
|
/** The choices the generation endpoints offer. */
|
|
1121
1128
|
generation?: GenerationOptions;
|
|
1129
|
+
/** What the host offered the card the last time it looked. */
|
|
1130
|
+
capability?: {
|
|
1131
|
+
/** When the card reported it. */
|
|
1132
|
+
at: number;
|
|
1133
|
+
/** One entry per piece the card looked for. */
|
|
1134
|
+
findings: Record<string, string>;
|
|
1135
|
+
};
|
|
1122
1136
|
}
|
|
1123
1137
|
/**
|
|
1124
1138
|
* Build the card's status document.
|
package/lib/index.js
CHANGED
|
@@ -746,6 +746,16 @@ const MINIMAX_ACTION_PATH = "/plugins/dsh-connect-minimaxcode/action";
|
|
|
746
746
|
* takes a minute and a half and is polled.
|
|
747
747
|
*/
|
|
748
748
|
const MINIMAX_GENERATE_PATH = "/plugins/dsh-connect-minimaxcode/generate";
|
|
749
|
+
/**
|
|
750
|
+
* Route the card reports what the host offers it on.
|
|
751
|
+
*
|
|
752
|
+
* Delivering a generated picture into a conversation needs several pieces of
|
|
753
|
+
* the host — the session, its face, the input box's attachment channel — and
|
|
754
|
+
* they are handed over in different ways. Reporting what is actually there
|
|
755
|
+
* turns "it did not work" into "this piece is missing", which is the only
|
|
756
|
+
* useful answer when something like that goes wrong.
|
|
757
|
+
*/
|
|
758
|
+
const MINIMAX_CAPABILITY_PATH = "/plugins/dsh-connect-minimaxcode/capability";
|
|
749
759
|
const HINTS = {
|
|
750
760
|
"app-missing": "未找到 MiniMax Code 的登录信息。请先安装并登录 MiniMax Code 桌面 App,然后重启 DSH。",
|
|
751
761
|
"not-signed-in": "MiniMax Code 尚未登录。请在 MiniMax Code 桌面 App 中登录后重启 DSH。",
|
|
@@ -776,6 +786,7 @@ function statusDocument(deps) {
|
|
|
776
786
|
...deps.signin === void 0 ? {} : { signin: deps.signin },
|
|
777
787
|
...deps.login === void 0 ? {} : { login: deps.login },
|
|
778
788
|
...deps.usageProfile === void 0 ? {} : { usageProfile: deps.usageProfile },
|
|
789
|
+
...deps.capability === void 0 ? {} : { capability: deps.capability },
|
|
779
790
|
...deps.generation === void 0 ? {} : { generation: deps.generation }
|
|
780
791
|
};
|
|
781
792
|
if (auth.state === "expired") return {
|
|
@@ -2646,6 +2657,8 @@ function apply(ctx) {
|
|
|
2646
2657
|
let loginPending = false;
|
|
2647
2658
|
/** Whether the server refused the plugin's own credential. */
|
|
2648
2659
|
let revokedByServer = false;
|
|
2660
|
+
/** What the card last reported about what the host offered it. */
|
|
2661
|
+
let capability;
|
|
2649
2662
|
/**
|
|
2650
2663
|
* Give up on the plugin's own credential after the server refused it.
|
|
2651
2664
|
*
|
|
@@ -3092,6 +3105,7 @@ function apply(ctx) {
|
|
|
3092
3105
|
signin: buildSigninStatus(),
|
|
3093
3106
|
login: buildLoginStatus(),
|
|
3094
3107
|
usageProfile: buildUsageProfileStatus(),
|
|
3108
|
+
capability,
|
|
3095
3109
|
generation: {
|
|
3096
3110
|
imageModels: [...IMAGE_MODELS],
|
|
3097
3111
|
imageAspectRatios: [...IMAGE_ASPECT_RATIOS],
|
|
@@ -3407,6 +3421,36 @@ function apply(ctx) {
|
|
|
3407
3421
|
}
|
|
3408
3422
|
}
|
|
3409
3423
|
}));
|
|
3424
|
+
webCtx.effect(() => webCtx.webServer.register({
|
|
3425
|
+
kind: "exact",
|
|
3426
|
+
path: MINIMAX_CAPABILITY_PATH,
|
|
3427
|
+
handler: async (req, res) => {
|
|
3428
|
+
if (!isLoopback(req.headers.host)) {
|
|
3429
|
+
res.writeHead(403, { "Content-Type": "application/json" });
|
|
3430
|
+
res.end(JSON.stringify({ error: "loopback only" }));
|
|
3431
|
+
return;
|
|
3432
|
+
}
|
|
3433
|
+
try {
|
|
3434
|
+
const raw = new URL(req.url ?? "/", "http://127.0.0.1").searchParams.get("report") ?? "";
|
|
3435
|
+
let findings = {};
|
|
3436
|
+
try {
|
|
3437
|
+
const parsed = JSON.parse(raw);
|
|
3438
|
+
if (typeof parsed === "object" && parsed !== null) for (const [key, value] of Object.entries(parsed)) findings[key] = String(value);
|
|
3439
|
+
} catch {
|
|
3440
|
+
findings = { report: "unreadable" };
|
|
3441
|
+
}
|
|
3442
|
+
capability = {
|
|
3443
|
+
at: Date.now(),
|
|
3444
|
+
findings
|
|
3445
|
+
};
|
|
3446
|
+
res.writeHead(204);
|
|
3447
|
+
res.end();
|
|
3448
|
+
} catch (error) {
|
|
3449
|
+
res.writeHead(500, { "Content-Type": "application/json" });
|
|
3450
|
+
res.end(JSON.stringify({ error: error instanceof Error ? error.message : String(error) }));
|
|
3451
|
+
}
|
|
3452
|
+
}
|
|
3453
|
+
}));
|
|
3410
3454
|
webCtx.effect(() => webCtx.webServer.register({
|
|
3411
3455
|
kind: "exact",
|
|
3412
3456
|
path: MINIMAX_GENERATE_PATH,
|
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.6.
|
|
5
|
+
"version": "0.6.4",
|
|
6
6
|
"author": "JeffTsuiCUG",
|
|
7
7
|
"contributors": [
|
|
8
8
|
{
|