dsh-loop-engine-allinone 0.7.0 → 0.7.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/CHANGELOG.md +39 -0
- package/README.md +50 -26
- package/README.zh.md +42 -23
- package/lib/index.js +10 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,45 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
8
8
|
|
|
9
9
|
Nothing yet.
|
|
10
10
|
|
|
11
|
+
## [0.7.2]
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- **Installation leads with `--profile web` again.** 0.7.1 made `<your-profile>` the
|
|
16
|
+
primary spelling, on the reasoning that `web` is one of several shipped templates.
|
|
17
|
+
That is true but the wrong shape for an install section: `dsh web` is the harness
|
|
18
|
+
CLI's own documented example (`dsh web` = `dsh --profile web`), and every published
|
|
19
|
+
plugin says `dsh plugin --profile web add ...` — dsh-market included. Forcing a
|
|
20
|
+
placeholder substitution before the first command is friction with no payoff for the
|
|
21
|
+
majority.
|
|
22
|
+
|
|
23
|
+
The non-`web` case is now a caveat section instead: `desktop`, `headless`, and
|
|
24
|
+
self-named profiles get both steps, plus the silent failure that follows from doing
|
|
25
|
+
only the first one. npm / GitHub / local-clone remain the three sources.
|
|
26
|
+
|
|
27
|
+
## [0.7.1]
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- **Installation no longer assumes a `web` profile.** `web` is one of several shipped
|
|
32
|
+
templates; the Desktop app boots `desktop`, a CI deployment boots `headless`, and
|
|
33
|
+
many people run a profile they named themselves. The instructions now say
|
|
34
|
+
`<your-profile>` and give the three real sources: npm, GitHub, and a local clone for
|
|
35
|
+
plugin development.
|
|
36
|
+
- **A wrong `profile:` is now diagnosable.** The field defaults to `web`, so forgetting
|
|
37
|
+
it writes the managed block into another profile's patch file while the profile that
|
|
38
|
+
actually boots never reads it — the plugin mounts, the base `agent-loop` row is never
|
|
39
|
+
disabled, and no hosted engine is reachable, with **nothing logged**. The harness
|
|
40
|
+
gives a plugin no way to ask which profile is running, so `apply` now checks whether
|
|
41
|
+
the target directory holds a profile's `package.json` and warns with the field to set.
|
|
42
|
+
It is a warning, not a failure: a first boot may legitimately precede the profile's
|
|
43
|
+
own files.
|
|
44
|
+
|
|
45
|
+
### Documented
|
|
46
|
+
|
|
47
|
+
- The engine picker appears in whichever profile renders a web UI, not specifically in
|
|
48
|
+
`web`.
|
|
49
|
+
|
|
11
50
|
## [0.7.0]
|
|
12
51
|
|
|
13
52
|
### Added
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
**dsh-loop-engine-allinone** is an all-in-one agent loop engine switcher for **[DeepSeek Harness](https://github.com/deepseek-ai)** (`dsh`). It enables per-session engine switching across **10 hosted engines** (Claude Code, Codex, Pi, Kimi Code, Antigravity, ZCode, Qoder CN, Hermes Agent, Grok Build, MiniMax Code) alongside the built-in `in-process` loop.
|
|
9
9
|
|
|
10
|
-
> `dsh` is the harness CLI. `dsh
|
|
10
|
+
> `dsh` is the harness CLI. `dsh --profile <name>` boots one of its **profiles**, and the engine picker plus this plugin's settings page appear in whichever profile renders a web UI (the shipped `web` template is one; the Desktop app uses `desktop`).
|
|
11
11
|
|
|
12
12
|
Sessions are fully independent: run Codex in one chat while another runs Kimi Code or Antigravity simultaneously. Handover between two hosted engines happens seamlessly in place; switching to or from the native `in-process` engine performs an in-browser reload without restarting the backend process. All without modifying the DeepSeek Harness core codebase.
|
|
13
13
|
|
|
@@ -33,40 +33,64 @@ Sessions are fully independent: run Codex in one chat while another runs Kimi Co
|
|
|
33
33
|
## Installation
|
|
34
34
|
|
|
35
35
|
```sh
|
|
36
|
-
# From npm (recommended)
|
|
37
36
|
dsh plugin --profile web add dsh-loop-engine-allinone
|
|
38
37
|
```
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
Restart `dsh web`, then open **Settings → Loop engine**.
|
|
40
|
+
|
|
41
|
+
### From GitHub instead of npm
|
|
41
42
|
|
|
42
43
|
```sh
|
|
43
|
-
dsh web
|
|
44
|
+
dsh plugin --profile web add yaliklinty/dsh-loop-engine-allinone
|
|
44
45
|
```
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
`headless` deployment, a renamed profile) means naming that profile instead:
|
|
48
|
-
`dsh plugin --profile desktop add dsh-loop-engine-allinone`, **and** setting
|
|
49
|
-
`profile: desktop` in the composition entry — see the notes below, because
|
|
50
|
-
forgetting the second half is the one mistake that leaves the plugin mounted but
|
|
51
|
-
unable to run any engine.
|
|
52
|
-
|
|
53
|
-
### Installation Notes
|
|
54
|
-
|
|
55
|
-
- **Profile Configuration**: The installer automatically injects a managed configuration block into your profile's `cordis.patch.yml`. All other custom configuration in that file is preserved.
|
|
56
|
-
- **Non-web Profiles**: When installing into non-web profiles (such as `desktop` or headless), explicitly specify `profile: <name>` in the composition entry:
|
|
57
|
-
```yaml
|
|
58
|
-
- id: loop-engine
|
|
59
|
-
config:
|
|
60
|
-
profile: desktop
|
|
61
|
-
```
|
|
62
|
-
*(Without this, configuration defaults to `web` and the plugin will not attach to custom profiles.)*
|
|
63
|
-
- **Uninstallation**: Run `dsh plugin --profile web remove dsh-loop-engine-allinone`, then remove the managed `loop-engine` block from `cordis.patch.yml`.
|
|
64
|
-
- **pnpm 10+**: If dependency build scripts are blocked (`ERR_PNPM_IGNORED_BUILDS` mentioning `esbuild`, `@google/genai`, etc.), run `pnpm approve-builds`.
|
|
65
|
-
- **Harness from Source**: If launching the harness directly from a source checkout, bridge peer dependencies using `file:` shims as described in [docs/source-checkout.md](docs/source-checkout.md).
|
|
47
|
+
### From a local clone
|
|
66
48
|
|
|
67
|
-
|
|
49
|
+
Only when you are working on the plugin itself:
|
|
68
50
|
|
|
69
|
-
|
|
51
|
+
```sh
|
|
52
|
+
git clone https://github.com/yaliklinty/dsh-loop-engine-allinone.git
|
|
53
|
+
dsh plugin --profile web add ./dsh-loop-engine-allinone
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Not on the `web` profile?
|
|
57
|
+
|
|
58
|
+
`web` is the profile the harness's own CLI documents (`dsh web` is short for
|
|
59
|
+
`dsh --profile web`), so it is the right default. But the Desktop app boots
|
|
60
|
+
`desktop`, a CI deployment may boot `headless`, and you may have made your own. In
|
|
61
|
+
that case:
|
|
62
|
+
|
|
63
|
+
1. install with that profile's name — `dsh plugin --profile desktop add
|
|
64
|
+
dsh-loop-engine-allinone`;
|
|
65
|
+
2. **and** set the same name in the composition entry:
|
|
66
|
+
|
|
67
|
+
```yaml
|
|
68
|
+
- id: loop-engine
|
|
69
|
+
config:
|
|
70
|
+
profile: desktop
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Step 2 is the one that bites. The field defaults to `web`, so omitting it makes the
|
|
74
|
+
plugin write its managed block into `profiles/web/cordis.patch.yml` while the profile
|
|
75
|
+
you actually boot never reads it: the plugin mounts, but the base `agent-loop` row is
|
|
76
|
+
never disabled, the router cannot take the agent-factory slot, and **no hosted engine
|
|
77
|
+
is reachable** — with nothing logged. This release also warns when it detects that
|
|
78
|
+
shape, naming the field to set.
|
|
79
|
+
|
|
80
|
+
### Installation notes
|
|
81
|
+
|
|
82
|
+
- The installer rewrites one managed block in the profile's `cordis.patch.yml`; every
|
|
83
|
+
other byte you wrote there is preserved, so upgrading needs no hand edit.
|
|
84
|
+
- **Uninstall**: `dsh plugin --profile web remove dsh-loop-engine-allinone`, **then
|
|
85
|
+
delete the managed `loop-engine` block** from that profile's `cordis.patch.yml`. The
|
|
86
|
+
block outlives the plugin, and while it is present the profile has no agent factory,
|
|
87
|
+
so no session can be created.
|
|
88
|
+
- **pnpm 10+** may block dependency build scripts (`ERR_PNPM_IGNORED_BUILDS` naming
|
|
89
|
+
`esbuild`, `@google/genai`, `protobufjs`). Run `pnpm approve-builds`, or add an
|
|
90
|
+
`allowBuilds` entry, and retry — only the installing project can grant this.
|
|
91
|
+
- **Harness from source**: bridge the profile's harness peers with `file:` shims, or
|
|
92
|
+
session resume fails with `agent-presets: refusing to compose an unscoped context`.
|
|
93
|
+
Steps in [docs/source-checkout.md](docs/source-checkout.md).
|
|
70
94
|
|
|
71
95
|
## Supported Engines
|
|
72
96
|
|
package/README.zh.md
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
**dsh-loop-engine-allinone** 是专为 [DeepSeek Harness](https://github.com/deepseek-ai)(`dsh`)打造的 Agent 循环引擎全功能切换插件。支持**按会话独立切换** 10 家主流外部引擎与 Harness 原生 `in-process` 循环。
|
|
9
9
|
|
|
10
|
+
> `dsh` 是 harness 的命令行程序;`dsh --profile <名字>` 启动它的某个 **profile**。引擎选择器与本插件的设置页出现在**任何渲染 web UI 的 profile** 里(随附的 `web` 模板是其中之一,桌面版用的是 `desktop`)。
|
|
11
|
+
|
|
10
12
|
各会话完全隔离互不干扰:一个窗口运行 Codex,另一个窗口可同时运行 Kimi Code 或 Antigravity。托管引擎之间支持**无缝原地热换**;切换至原生 `in-process` 时会自动刷新页面重新挂载(无需重启 `dsh web` 后端进程)。**全程无需修改 DeepSeek Harness 主仓库源码**。
|
|
11
13
|
|
|
12
14
|
> **Fork 说明**:本项目基于 [`kuun993/dsh-loop-engine`](https://github.com/kuun993/dsh-loop-engine) 进行深度重构与扩展。
|
|
@@ -30,42 +32,59 @@
|
|
|
30
32
|
|
|
31
33
|
## 安装说明
|
|
32
34
|
|
|
33
|
-
通过 `dsh plugin` 命令行直接安装:
|
|
34
|
-
|
|
35
35
|
```sh
|
|
36
|
-
# 从 npm 安装(推荐)
|
|
37
36
|
dsh plugin --profile web add dsh-loop-engine-allinone
|
|
38
37
|
```
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
重启 `dsh web`,打开 **Settings → Loop engine**。
|
|
40
|
+
|
|
41
|
+
### 想从 GitHub 装而不是 npm
|
|
41
42
|
|
|
42
43
|
```sh
|
|
43
|
-
dsh web
|
|
44
|
+
dsh plugin --profile web add yaliklinty/dsh-loop-engine-allinone
|
|
44
45
|
```
|
|
45
46
|
|
|
46
|
-
|
|
47
|
+
### 从本地克隆安装
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
要把 `--profile web` 换成对应名字,**并且**在组合条目里写 `profile: <名字>`。
|
|
50
|
-
只做前一半是本插件最容易犯的错:插件挂上了,却一个引擎都跑不起来。详见下方安装须知。
|
|
49
|
+
只在开发插件本身时才需要:
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
```sh
|
|
52
|
+
git clone https://github.com/yaliklinty/dsh-loop-engine-allinone.git
|
|
53
|
+
dsh plugin --profile web add ./dsh-loop-engine-allinone
|
|
54
|
+
```
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
- **非 Web Profile 部署**:若安装至桌面版 `desktop` 或 headless 等自定义 profile,需在配置中显式指定 `profile: <name>`:
|
|
56
|
-
```yaml
|
|
57
|
-
- id: loop-engine
|
|
58
|
-
config:
|
|
59
|
-
profile: desktop
|
|
60
|
-
```
|
|
61
|
-
*(若未指定,插件默认挂载到 `web` profile,导致自定义 profile 无法生效。)*
|
|
62
|
-
- **卸载插件**:执行 `dsh plugin --profile web remove dsh-loop-engine-allinone`,并手动清理 `cordis.patch.yml` 中残留的 `loop-engine` 受管块。
|
|
63
|
-
- **pnpm 10+ 构建拦截**:若遇到 `ERR_PNPM_IGNORED_BUILDS`(提示 `esbuild`、`@google/genai` 等构建被忽略),执行 `pnpm approve-builds` 允许即可。
|
|
64
|
-
- **源码模式运行 Harness**:若通过源码启动 Harness,需按照 [docs/source-checkout.md](docs/source-checkout.md) 说明配置 `file:` shim 桥接依赖包。
|
|
56
|
+
### 不是 `web` profile?
|
|
65
57
|
|
|
66
|
-
|
|
58
|
+
`web` 是 harness 自己的 CLI 文档里用的那个 profile(`dsh web` 就是 `dsh --profile web`
|
|
59
|
+
的简写),所以它是正确的默认值。但桌面版启动的是 `desktop`,CI 部署可能用 `headless`,
|
|
60
|
+
你也可能自己建过一个。这种情况下:
|
|
67
61
|
|
|
68
|
-
|
|
62
|
+
1. 用那个 profile 的名字安装 —— `dsh plugin --profile desktop add dsh-loop-engine-allinone`;
|
|
63
|
+
2. **并且**在组合条目里写上同一个名字:
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
- id: loop-engine
|
|
67
|
+
config:
|
|
68
|
+
profile: desktop
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**第 2 步才是会咬人的地方。** 该字段默认是 `web`,漏写会让插件把受管块写进
|
|
72
|
+
`profiles/web/cordis.patch.yml`,而你实际启动的 profile 永远读不到它:插件挂上了,
|
|
73
|
+
但基础 `agent-loop` 行没被禁,路由器拿不到 agent factory 槽位,**任何托管引擎都不可达**
|
|
74
|
+
——而且不报错。本版本会在检测到这种情形时告警,并指出该设哪个字段。
|
|
75
|
+
|
|
76
|
+
### 安装注意事项
|
|
77
|
+
|
|
78
|
+
- 安装会重写该 profile `cordis.patch.yml` 里的一段受管块;你写的其它内容逐字节保留,升级不需要手工改。
|
|
79
|
+
- **卸载**:`dsh plugin --profile web remove dsh-loop-engine-allinone`,**然后手动删掉**
|
|
80
|
+
该 profile `cordis.patch.yml` 里的 `loop-engine` 受管块。块会比插件活得久,而它还在时
|
|
81
|
+
profile 里没有任何 agent factory,会话一条也建不出来。
|
|
82
|
+
- **pnpm 10+** 可能拦下依赖的 build script(`ERR_PNPM_IGNORED_BUILDS`,列出 `esbuild`、
|
|
83
|
+
`@google/genai`、`protobufjs`)。执行 `pnpm approve-builds`,或加一条 `allowBuilds`,然后重试
|
|
84
|
+
——只有安装方能授予这个权限。
|
|
85
|
+
- **用源码启动 harness** 时,要用 `file:` shim 把 profile 的 harness peer 包桥接到 checkout 源码,
|
|
86
|
+
否则恢复会话会报 `agent-presets: refusing to compose an unscoped context`。
|
|
87
|
+
步骤见 [docs/source-checkout.md](docs/source-checkout.md)。
|
|
69
88
|
|
|
70
89
|
## 支持引擎一览
|
|
71
90
|
|
package/lib/index.js
CHANGED
|
@@ -89,7 +89,7 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
// src/index.ts
|
|
92
|
-
import { readFileSync as readFileSync5 } from "node:fs";
|
|
92
|
+
import { existsSync as existsSync8, readFileSync as readFileSync5 } from "node:fs";
|
|
93
93
|
import { mkdir as mkdir2, readFile as readFile6, rename as rename2, writeFile as writeFile2 } from "node:fs/promises";
|
|
94
94
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
95
95
|
import { dirname as dirname7, join as join21 } from "node:path";
|
|
@@ -11476,9 +11476,18 @@ function readPatchFileSync(path) {
|
|
|
11476
11476
|
throw error;
|
|
11477
11477
|
}
|
|
11478
11478
|
}
|
|
11479
|
+
function warnIfProfileLooksWrong(ctx, config, patchPath) {
|
|
11480
|
+
const profileDir = dirname7(patchPath);
|
|
11481
|
+
if (existsSync8(join21(profileDir, "package.json"))) return;
|
|
11482
|
+
const named = config.profile ?? "web";
|
|
11483
|
+
ctx.logger.warn(
|
|
11484
|
+
`loop-engine: profile "${named}" has no package.json beside "${patchPath}". If you boot a different profile, set \`profile: <that-name>\` in this plugin's composition entry - otherwise its managed block is written here, the profile you actually boot never reads it, and no hosted engine will be reachable.`
|
|
11485
|
+
);
|
|
11486
|
+
}
|
|
11479
11487
|
function apply(ctx, config) {
|
|
11480
11488
|
const summarizer = resolveSummarizerTarget(config);
|
|
11481
11489
|
const patchPath = resolvePatchPath(config);
|
|
11490
|
+
warnIfProfileLooksWrong(ctx, config, patchPath);
|
|
11482
11491
|
const patchText = readPatchFileSync(patchPath);
|
|
11483
11492
|
const legacyEngine = legacyBlockEngineOf(patchText);
|
|
11484
11493
|
const needsWrite = hasLegacyManagedBlock(patchText) || !hasManagedBlock(patchText);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-loop-engine-allinone",
|
|
3
3
|
"description": "Web-switchable agent loop engine selection for the DeepSeek Harness - out-of-tree plugin with a data-driven engine registry and a pluggable driver layer. Ten engines: Claude Code / Codex / Pi / Kimi Code / Antigravity / ZCode / Qoder CN / Hermes / Grok Build / MiniMax Code. All-in-one fork of kuun993/dsh-loop-engine.",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
7
7
|
},
|