@ljwei-stak/dsh-model-router 0.14.0-beta.1 → 0.14.0-beta.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/.dsh-plugin/client.js +25 -7
- package/.dsh-plugin/official-tools-remote-service.mjs +8 -1
- package/CHANGELOG.md +14 -2
- package/README.md +2 -1
- package/README.zh.md +2 -1
- package/package.json +1 -1
package/.dsh-plugin/client.js
CHANGED
|
@@ -11600,6 +11600,24 @@ var xterm_default = `/**
|
|
|
11600
11600
|
}
|
|
11601
11601
|
`;
|
|
11602
11602
|
|
|
11603
|
+
// .dsh-plugin/client/host-version.mjs
|
|
11604
|
+
var ROUTER_CLIENT_VERSION = true ? "0.14.0-beta.2" : "";
|
|
11605
|
+
var STALE_HOST_MESSAGE = "\u63D2\u4EF6\u540E\u53F0\u7248\u672C\u8F83\u65E7\uFF0C\u8BF7\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u542F Harness\uFF08\u5305\u62EC\u6258\u76D8\u56FE\u6807\uFF09\u540E\u518D\u4F7F\u7528\u3002";
|
|
11606
|
+
function isMissingRemoteMethod(message) {
|
|
11607
|
+
const value = String(message ?? "");
|
|
11608
|
+
return /transport failure for [^:]+: HTTP 404\b/.test(value) || /Remote method \S+ is no longer mounted/.test(value);
|
|
11609
|
+
}
|
|
11610
|
+
function remoteErrorText(message, fallback = "") {
|
|
11611
|
+
if (isMissingRemoteMethod(message)) return STALE_HOST_MESSAGE;
|
|
11612
|
+
return String(message ?? "").trim() || fallback;
|
|
11613
|
+
}
|
|
11614
|
+
function staleHostNotice({ hostVersion, clientVersion = ROUTER_CLIENT_VERSION, loaded = true } = {}) {
|
|
11615
|
+
if (!loaded || !clientVersion) return "";
|
|
11616
|
+
if (typeof hostVersion !== "string" || !hostVersion) return `${STALE_HOST_MESSAGE}\uFF08\u754C\u9762\u4E3A ${clientVersion}\uFF0C\u540E\u53F0\u4E3A\u66F4\u65E9\u7248\u672C\uFF09`;
|
|
11617
|
+
if (hostVersion !== clientVersion) return `${STALE_HOST_MESSAGE}\uFF08\u754C\u9762\u4E3A ${clientVersion}\uFF0C\u540E\u53F0\u4E3A ${hostVersion}\uFF09`;
|
|
11618
|
+
return "";
|
|
11619
|
+
}
|
|
11620
|
+
|
|
11603
11621
|
// .dsh-plugin/shared/cli-terminal-protocol.mjs
|
|
11604
11622
|
var TERMINAL_TOOL_IDS = Object.freeze(["codex", "claude-code", "kimi-code", "minimax-code", "mimo-code", "grok-build", "gemini"]);
|
|
11605
11623
|
var TERMINAL_SHELL_ID = "shell";
|
|
@@ -11763,7 +11781,7 @@ var formatDuration = (ms2) => {
|
|
|
11763
11781
|
};
|
|
11764
11782
|
var unwrap = (response, fallback) => {
|
|
11765
11783
|
if (response?.ok) return response.value;
|
|
11766
|
-
throw new Error(text3(response?.error?.message) || text3(response?.error)
|
|
11784
|
+
throw new Error(remoteErrorText(text3(response?.error?.message) || text3(response?.error), fallback));
|
|
11767
11785
|
};
|
|
11768
11786
|
var TerminalConnection = class {
|
|
11769
11787
|
constructor({ api, sessionId, onData, onExit, onError, waitMs = 800, retryMs = 1e3, resizeDelayMs = 120, setTimer = setTimeout, clearTimer = clearTimeout }) {
|
|
@@ -11856,7 +11874,7 @@ var TerminalConnection = class {
|
|
|
11856
11874
|
// .dsh-plugin/client/cli-terminal.jsx
|
|
11857
11875
|
var CWD_STORAGE_KEY = "model-router.terminal.cwd";
|
|
11858
11876
|
var text4 = (value) => typeof value === "string" ? value.trim() : "";
|
|
11859
|
-
var errorText = (error, fallback) => text4(error?.message)
|
|
11877
|
+
var errorText = (error, fallback) => remoteErrorText(text4(error?.message), fallback);
|
|
11860
11878
|
function storedCwd() {
|
|
11861
11879
|
try {
|
|
11862
11880
|
return globalThis.localStorage?.getItem(CWD_STORAGE_KEY) ?? "";
|
|
@@ -11959,7 +11977,7 @@ function CliTerminalCard({ api, health }) {
|
|
|
11959
11977
|
try {
|
|
11960
11978
|
const response = await api.terminalInfo();
|
|
11961
11979
|
if (!mounted.current) return;
|
|
11962
|
-
if (!response?.ok) throw new Error(
|
|
11980
|
+
if (!response?.ok) throw new Error(remoteErrorText(response?.error?.message, "\u65E0\u6CD5\u8BFB\u53D6\u7EC8\u7AEF\u72B6\u6001\u3002"));
|
|
11963
11981
|
setInfo({ status: "ready", value: response.value, error: "" });
|
|
11964
11982
|
} catch (error) {
|
|
11965
11983
|
if (mounted.current) setInfo({ status: "error", value: null, error: errorText(error, "\u65E0\u6CD5\u8BFB\u53D6\u7EC8\u7AEF\u72B6\u6001\u3002") });
|
|
@@ -11990,7 +12008,7 @@ function CliTerminalCard({ api, health }) {
|
|
|
11990
12008
|
setStartError("");
|
|
11991
12009
|
try {
|
|
11992
12010
|
const response = await api.terminalStart({ target: selected.id, mode, cwd: text4(cwd), cols: 100, rows: 30, confirmed: true });
|
|
11993
|
-
if (!response?.ok) throw new Error(
|
|
12011
|
+
if (!response?.ok) throw new Error(remoteErrorText(response?.error?.message, "\u7EC8\u7AEF\u542F\u52A8\u5931\u8D25\u3002"));
|
|
11994
12012
|
storeCwd(text4(cwd));
|
|
11995
12013
|
if (!mounted.current) {
|
|
11996
12014
|
void api.terminalStop({ sessionId: response.value.sessionId });
|
|
@@ -12046,7 +12064,7 @@ function CliTerminalCard({ api, health }) {
|
|
|
12046
12064
|
setConfirming(false);
|
|
12047
12065
|
}
|
|
12048
12066
|
}
|
|
12049
|
-
))), targets.length === 1 && /* @__PURE__ */ import_react4.default.createElement("p", { className: "mr-caption" }, "\u4F53\u68C0\u5C1A\u672A\u53D1\u73B0\u5DF2\u5B89\u88C5\u7684\u5B98\u65B9 CLI\uFF1B\u5B89\u88C5\u540E\u70B9\u201C\u5B98\u65B9\u5DE5\u5177 \xB7 \u4F53\u68C0\u201D\u7684\u201C\u91CD\u65B0\u4F53\u68C0\u201D\uFF0C\u8FD9\u91CC\u4F1A\u51FA\u73B0\u5BF9\u5E94\u9009\u9879\u3002"), !confirming && /* @__PURE__ */ import_react4.default.createElement("div", { className: "mr-actions" }, /* @__PURE__ */ import_react4.default.createElement("button", { className: "mr-button", type: "button", disabled: Boolean(problem) || live >= maxSessions, onClick: () => {
|
|
12067
|
+
))), targets.length === 1 && /* @__PURE__ */ import_react4.default.createElement("p", { className: "mr-caption" }, "\u4F53\u68C0\u5C1A\u672A\u53D1\u73B0\u5DF2\u5B89\u88C5\u7684\u5B98\u65B9 CLI\uFF1B\u5B89\u88C5\u540E\u70B9\u201C\u5B98\u65B9\u5DE5\u5177 \xB7 \u4F53\u68C0\u201D\u7684\u201C\u91CD\u65B0\u4F53\u68C0\u201D\uFF0C\u8FD9\u91CC\u4F1A\u51FA\u73B0\u5BF9\u5E94\u9009\u9879\u3002"), !confirming && /* @__PURE__ */ import_react4.default.createElement("div", { className: "mr-actions" }, /* @__PURE__ */ import_react4.default.createElement("button", { className: "mr-button", type: "button", disabled: Boolean(problem) || live >= maxSessions || info.status !== "ready", onClick: () => {
|
|
12050
12068
|
setStartError("");
|
|
12051
12069
|
setConfirming(true);
|
|
12052
12070
|
} }, "\u5F00\u59CB"), /* @__PURE__ */ import_react4.default.createElement("span", { className: "mr-caption" }, problem || (live >= maxSessions ? `\u6700\u591A\u540C\u65F6\u8FD0\u884C ${maxSessions} \u4E2A\u4F1A\u8BDD\u3002` : `\u5C06\u8FD0\u884C\uFF1A${details.command}`))), confirming && /* @__PURE__ */ import_react4.default.createElement("div", { className: "mr-term-confirm", role: "dialog", "aria-label": "\u786E\u8BA4\u542F\u52A8\u7EC8\u7AEF" }, /* @__PURE__ */ import_react4.default.createElement("strong", null, details.title), /* @__PURE__ */ import_react4.default.createElement("p", { className: "mr-caption" }, "\u547D\u4EE4\uFF1A", /* @__PURE__ */ import_react4.default.createElement("code", null, details.command), /* @__PURE__ */ import_react4.default.createElement("br", null), "\u5DE5\u4F5C\u76EE\u5F55\uFF1A", /* @__PURE__ */ import_react4.default.createElement("code", null, details.cwd)), /* @__PURE__ */ import_react4.default.createElement("ul", null, details.points.map((point) => /* @__PURE__ */ import_react4.default.createElement("li", { key: point }, point))), /* @__PURE__ */ import_react4.default.createElement("div", { className: "mr-actions" }, /* @__PURE__ */ import_react4.default.createElement("button", { className: "mr-button", type: "button", disabled: starting, onClick: () => {
|
|
@@ -12307,7 +12325,7 @@ function OfficialToolsCard({ listOfficialTools, installOfficialTool, cancelOffic
|
|
|
12307
12325
|
const capabilities = Array.isArray(response.value?.executionCapabilities) ? response.value.executionCapabilities : [];
|
|
12308
12326
|
const readiness = Array.isArray(response.value?.executionReadiness) ? response.value.executionReadiness : [];
|
|
12309
12327
|
setProbeState({ status: "ready", probes, capabilities, readiness, error: "" });
|
|
12310
|
-
onProbes({ probes, capabilities, readiness });
|
|
12328
|
+
onProbes({ probes, capabilities, readiness, hostVersion: typeof response.value?.hostVersion === "string" ? response.value.hostVersion : null });
|
|
12311
12329
|
} catch (error) {
|
|
12312
12330
|
if (!mounted.current || current !== request.current) return;
|
|
12313
12331
|
setProbeState({ status: "error", probes: [], capabilities: [], readiness: [], error: text5(error?.message) || "\u65E0\u6CD5\u68C0\u6D4B\u5B98\u65B9\u5DE5\u5177\u3002" });
|
|
@@ -12610,7 +12628,7 @@ function RouterMainPage({ loadCatalog, settingsScope, listOfficialTools, install
|
|
|
12610
12628
|
setPlanError(text5(error?.message) || "\u65E0\u6CD5\u751F\u6210\u8DEF\u7531\u5EFA\u8BAE\u3002");
|
|
12611
12629
|
}
|
|
12612
12630
|
};
|
|
12613
|
-
return /* @__PURE__ */ import_react5.default.createElement("main", { className: "mr-workspace" }, /* @__PURE__ */ import_react5.default.createElement("style", null, router_main_default), /* @__PURE__ */ import_react5.default.createElement("div", { className: "mr-shell" }, /* @__PURE__ */ import_react5.default.createElement("header", { className: "mr-header" }, /* @__PURE__ */ import_react5.default.createElement("div", null, /* @__PURE__ */ import_react5.default.createElement("p", { className: "mr-eyebrow" }, "Model Router \xB7 DeepSeek Harness"), /* @__PURE__ */ import_react5.default.createElement("h1", { className: "mr-title" }, "\u6A21\u578B\u8DEF\u7531\u5DE5\u4F5C\u53F0"), /* @__PURE__ */ import_react5.default.createElement("p", { className: "mr-subtitle" }, "\u67E5\u770B\u5B98\u65B9\u6A21\u578B\u76EE\u5F55\uFF0C\u4E3A\u4EFB\u52A1\u751F\u6210\u8DEF\u7EBF\u5EFA\u8BAE\u4E0E\u56E2\u961F\u5DE5\u4F5C\u5305\u3002\u4E3B\u4F1A\u8BDD\u6A21\u578B\u4ECD\u7531\u5B98\u65B9\u9009\u62E9\u5668\u7BA1\u7406\u3002")), /* @__PURE__ */ import_react5.default.createElement("div", { className: "mr-status" }, /* @__PURE__ */ import_react5.default.createElement("span", { className: `mr-status-dot ${catalogState.status === "loading" ? "loading" : catalogState.status === "error" ? "error" : ""}` }), catalogState.status === "ready" ? `${providerCount} \u4E2A\u4F9B\u5E94\u5546 \xB7 ${routes.length} \u6761\u8DEF\u7EBF` : catalogState.status === "loading" ? "\u6B63\u5728\u8BFB\u53D6\u6A21\u578B\u76EE\u5F55" : "\u6A21\u578B\u76EE\u5F55\u8BFB\u53D6\u5931\u8D25")), (workbench.health.report?.notices ?? []).map((notice) => /* @__PURE__ */ import_react5.default.createElement("div", { key: `${notice.kind}-${notice.at}`, className: "mr-error", role: "alert" }, notice.message)), workbench.health.report && !workbench.health.report.onboarding?.completedAt && /* @__PURE__ */ import_react5.default.createElement(
|
|
12631
|
+
return /* @__PURE__ */ import_react5.default.createElement("main", { className: "mr-workspace" }, /* @__PURE__ */ import_react5.default.createElement("style", null, router_main_default), /* @__PURE__ */ import_react5.default.createElement("div", { className: "mr-shell" }, /* @__PURE__ */ import_react5.default.createElement("header", { className: "mr-header" }, /* @__PURE__ */ import_react5.default.createElement("div", null, /* @__PURE__ */ import_react5.default.createElement("p", { className: "mr-eyebrow" }, "Model Router \xB7 DeepSeek Harness"), /* @__PURE__ */ import_react5.default.createElement("h1", { className: "mr-title" }, "\u6A21\u578B\u8DEF\u7531\u5DE5\u4F5C\u53F0"), /* @__PURE__ */ import_react5.default.createElement("p", { className: "mr-subtitle" }, "\u67E5\u770B\u5B98\u65B9\u6A21\u578B\u76EE\u5F55\uFF0C\u4E3A\u4EFB\u52A1\u751F\u6210\u8DEF\u7EBF\u5EFA\u8BAE\u4E0E\u56E2\u961F\u5DE5\u4F5C\u5305\u3002\u4E3B\u4F1A\u8BDD\u6A21\u578B\u4ECD\u7531\u5B98\u65B9\u9009\u62E9\u5668\u7BA1\u7406\u3002")), /* @__PURE__ */ import_react5.default.createElement("div", { className: "mr-status" }, /* @__PURE__ */ import_react5.default.createElement("span", { className: `mr-status-dot ${catalogState.status === "loading" ? "loading" : catalogState.status === "error" ? "error" : ""}` }), catalogState.status === "ready" ? `${providerCount} \u4E2A\u4F9B\u5E94\u5546 \xB7 ${routes.length} \u6761\u8DEF\u7EBF` : catalogState.status === "loading" ? "\u6B63\u5728\u8BFB\u53D6\u6A21\u578B\u76EE\u5F55" : "\u6A21\u578B\u76EE\u5F55\u8BFB\u53D6\u5931\u8D25")), staleHostNotice({ hostVersion: toolProbes?.hostVersion, loaded: Boolean(toolProbes?.probes?.length) }) && /* @__PURE__ */ import_react5.default.createElement("div", { className: "mr-error", role: "alert" }, staleHostNotice({ hostVersion: toolProbes?.hostVersion })), (workbench.health.report?.notices ?? []).map((notice) => /* @__PURE__ */ import_react5.default.createElement("div", { key: `${notice.kind}-${notice.at}`, className: "mr-error", role: "alert" }, notice.message)), workbench.health.report && !workbench.health.report.onboarding?.completedAt && /* @__PURE__ */ import_react5.default.createElement(
|
|
12614
12632
|
OnboardingBanner,
|
|
12615
12633
|
{
|
|
12616
12634
|
health: workbench.health.report,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** Host receiver for the official desktop's typed one-click installer RPC. */
|
|
2
|
+
import { readFileSync } from 'node:fs'
|
|
2
3
|
import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol'
|
|
3
4
|
import { getOfficialTool } from './shared/official-tool-registry.mjs'
|
|
4
5
|
import { officialToolExecutionCapabilities, officialToolReadiness } from './shared/official-tool-executor.mjs'
|
|
@@ -16,6 +17,12 @@ import {
|
|
|
16
17
|
OFFICIAL_TOOLS_REMOTE_NAMESPACE,
|
|
17
18
|
} from './shared/official-tools-remote.mjs'
|
|
18
19
|
|
|
20
|
+
/** Version of the plugin code this Host process actually imported. */
|
|
21
|
+
export const HOST_PLUGIN_VERSION = (() => {
|
|
22
|
+
try { return JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version ?? null }
|
|
23
|
+
catch { return null }
|
|
24
|
+
})()
|
|
25
|
+
|
|
19
26
|
function errorText(error) {
|
|
20
27
|
return error instanceof Error ? error.message : String(error)
|
|
21
28
|
}
|
|
@@ -77,7 +84,7 @@ export class OfficialToolsRemoteService extends TypertRemoteService {
|
|
|
77
84
|
const executionReadiness = await Promise.all(tools.map(tool => tool.installed
|
|
78
85
|
? officialToolReadiness(tool.id)
|
|
79
86
|
: Promise.resolve({ id: tool.id, ready: false, reason: 'CLI 尚未安装或版本检测失败。' })))
|
|
80
|
-
return { tools, executionCapabilities: officialToolExecutionCapabilities(), executionReadiness }
|
|
87
|
+
return { tools, executionCapabilities: officialToolExecutionCapabilities(), executionReadiness, hostVersion: HOST_PLUGIN_VERSION }
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
/** Start one serialized fixed-registry install; return immediately for UI polling. */
|
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.14.0-beta.
|
|
3
|
+
## 0.14.0-beta.2 — 2026-10-03
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Prerelease under the npm `next` tag only (`latest` stays 0.13.3).
|
|
6
|
+
|
|
7
|
+
**After installing or updating, quit Harness completely (including the tray icon) and start it again.** Harness serves the new workbench UI immediately, but the running Host keeps the plugin code it already imported, so new Host methods are missing until a full restart.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- With 0.14.0-beta.1 installed into a running Harness, the 官方工具终端 card showed `transport failure for /api/modelRouterOfficialTools/terminalInfo: HTTP 404`. The Harness gateway only routes `/api/<namespace>/<method>` for descriptors the Host registered when it applied the plugin; the Host was still running the previous version's code. Nothing in the plugin's routes was wrong. The card now shows "插件后台版本较旧,请完全退出并重启 Harness(包括托盘图标)后再使用。" for a missing method and disables 开始.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- `list()` reports `hostVersion`, the plugin version the Host actually loaded; the client embeds its own version at build time. When they differ (or the Host is too old to report one), the workbench shows the same restart advice at the top.
|
|
14
|
+
|
|
15
|
+
## 0.14.0-beta.1 — 2026-10-03
|
|
16
|
+
|
|
17
|
+
Prerelease under the npm `next` tag (branch `feat/cli-terminal`).
|
|
6
18
|
|
|
7
19
|
### Added
|
|
8
20
|
- **官方工具终端** workbench card: interactive sessions of the system shell (PowerShell on Windows) or an installed official CLI (codex, claude, kimi, mcode, mimo, grok, gemini), in tabs, rendered with xterm.js 6 (bundled into `client.js`). Each CLI also has a fixed **登录** mode (`codex login`, `claude auth login`, …). Sessions start only after a confirmation showing the command, the absolute working directory, and that the terminal runs outside the Harness process sandbox with the user's own CLI login and environment.
|
package/README.md
CHANGED
|
@@ -402,7 +402,7 @@ Claude Code, Codex, MiMo Code, and Grok Build support read-only and approved edi
|
|
|
402
402
|
|
|
403
403
|
The planned Harness model ID is not necessarily the vendor CLI's model name. A saved `cliModel`, or temporary `cliModelsJson` keyed by tool or work-package ID, can provide a known vendor CLI name. A package-specific temporary mapping takes priority over a tool mapping, then the saved profile. ZCode uses its configured default model. Most vendor CLIs do not provide a verifiable actual model ID in their results, so inspect vendor run records to confirm which model and price applied. The plugin's sequential CLI team runner is separate from Harness's built-in Agent Teams lifecycle.
|
|
404
404
|
|
|
405
|
-
### Interactive terminal (官方工具终端, 0.14.0-beta.
|
|
405
|
+
### Interactive terminal (官方工具终端, 0.14.0-beta.2, npm `next`)
|
|
406
406
|
|
|
407
407
|
The workbench has an **官方工具终端** card below the tool health check. It runs your system shell (PowerShell on Windows, your login `$SHELL` elsewhere) or one installed official CLI (`codex`, `claude`, `kimi`, `mcode`, `mimo`, `grok`, `gemini`) interactively, in tabs, with live output: multi-turn conversations, full-screen TUIs, and logins such as `codex login`, `claude auth login`, `kimi login`, `mcode login`, `mimo auth login`, `grok login` (choose **登录**).
|
|
408
408
|
|
|
@@ -412,6 +412,7 @@ The workbench has an **官方工具终端** card below the tool health check. It
|
|
|
412
412
|
- **Transport.** Output streams through long-poll reads over the plugin's existing Typert remote (`terminalRead`); keystrokes (`terminalWrite`) and resizes (`terminalResize`) are separate calls.
|
|
413
413
|
- **Lifetime.** Ending the tab, closing the workbench panel, unloading or reloading the plugin, or quitting Harness kills the process. A session that nobody reads for about 2 minutes is killed, and no session runs longer than 6 hours. At most 4 sessions run at once.
|
|
414
414
|
- **Privacy.** Input and output are never logged or saved. The card's history (and `state.json` → `terminalSessions`) stores only the tool, mode, working directory, start/end time, duration, exit code, and end reason.
|
|
415
|
+
- **Restart after installing.** Harness serves the new card immediately, but a running Host keeps the old plugin code; until you quit Harness completely (including the tray icon) and start it again, the card shows “插件后台版本较旧,请完全退出并重启 Harness”.
|
|
415
416
|
- **Keys.** With text selected, Ctrl+C copies; otherwise it interrupts. Ctrl+Shift+V pastes. Drag the terminal's lower-right corner to change its height.
|
|
416
417
|
|
|
417
418
|
## Optional GAL installation
|
package/README.zh.md
CHANGED
|
@@ -391,7 +391,7 @@ Claude 与 Codex 若本机已有经核验的签名入口,仍优先走原有沙
|
|
|
391
391
|
|
|
392
392
|
Harness 目录中的模型 ID 未必是厂商 CLI 接受的名字。逐模型设置可填写 `cliModel`;团队执行时临时的“工作包映射 > 工具映射 > 保存映射”。ZCode 3.14.3 不能逐次切换模型。多数 CLI 不回报可核验的实际模型 ID,执行后要对照厂商运行记录、权限和账单。Windows Harness 沙箱的 ACL 文件效果报告为部分隔离,涉及敏感仓库时应先用测试环境验证。
|
|
393
393
|
|
|
394
|
-
### 官方工具终端(0.14.0-beta.
|
|
394
|
+
### 官方工具终端(0.14.0-beta.2,npm `next`)
|
|
395
395
|
|
|
396
396
|
工作台“官方工具 · 体检”下方新增 **官方工具终端** 卡片:以标签页形式交互运行系统终端(Windows 为 PowerShell,其他系统为登录 `$SHELL`)或已安装的官方 CLI(`codex`、`claude`、`kimi`、`mcode`、`mimo`、`grok`、`gemini`),实时输出,可多轮对话、显示全屏界面,也可选 **登录** 直接运行 `codex login`、`claude auth login`、`kimi login`、`mcode login`、`mimo auth login`、`grok login`。
|
|
397
397
|
|
|
@@ -401,6 +401,7 @@ Harness 目录中的模型 ID 未必是厂商 CLI 接受的名字。逐模型设
|
|
|
401
401
|
- **传输**:输出通过插件现有 Typert 远程调用的长轮询读取(`terminalRead`)实时推送;按键(`terminalWrite`)和窗口大小(`terminalResize`)分别发送。
|
|
402
402
|
- **生命周期**:结束标签、关闭工作台面板、卸载或重新加载插件、退出 Harness 都会结束进程;约 2 分钟无人读取输出的会话会被结束;单个会话最长 6 小时;最多同时 4 个。
|
|
403
403
|
- **隐私**:输入和输出不会写入日志或保存。卡片中的历史(`state.json` 的 `terminalSessions`)只记录工具、方式、工作目录、开始/结束时间、时长、退出码和结束原因。
|
|
404
|
+
- **安装后需重启**:Harness 会立即加载新界面,但运行中的后台仍是旧插件代码;完全退出 Harness(包括托盘图标)并重新启动前,卡片会提示“插件后台版本较旧,请完全退出并重启 Harness”。
|
|
404
405
|
- **按键**:选中文字时 Ctrl+C 复制,否则发送中断;Ctrl+Shift+V 粘贴;拖动终端右下角调整高度。
|
|
405
406
|
|
|
406
407
|
## 可选安装 GAL
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ljwei-stak/dsh-model-router",
|
|
3
|
-
"version": "0.14.0-beta.
|
|
3
|
+
"version": "0.14.0-beta.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Model Router for official DeepSeek Harness Desktop: cost-aware task routing, dependent work packages and official vendor CLI discovery, installation and execution. GAL is available separately as @ljwei-stak/dsh-galgame.",
|
|
6
6
|
"repository": {
|