dsh-loop-engine 1.0.0-rc2 → 1.0.0-rc3
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.md +28 -41
- package/README.zh.md +21 -35
- package/cordis.patch.yml +3 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -22,9 +22,21 @@ without changing anything in the main repository.
|
|
|
22
22
|
- **Extensible.** Adding an engine is one driver module plus one entry in the
|
|
23
23
|
settings schema.
|
|
24
24
|
- **Zero main-repo changes.** Installed purely as a profile dependency plus one
|
|
25
|
-
|
|
25
|
+
bundle layer, with no edits to the main repository.
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
dsh plugin --profile web add dsh-loop-engine
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Restart `dsh web`, then open **Settings → Loop engine**.
|
|
34
|
+
|
|
35
|
+
`dsh plugin add` installs the package into the web profile and registers it as
|
|
36
|
+
a bundle layer — the package declares `dsh.bundle.patch`, so no manual edit of
|
|
37
|
+
`cordis.patch.yml` is needed. It is published on npm as `dsh-loop-engine`.
|
|
38
|
+
|
|
39
|
+
### Requirements
|
|
28
40
|
|
|
29
41
|
- dsh `0.1.1-rc.2` (or a build whose peer packages match).
|
|
30
42
|
- For the Claude Code engine: the Claude Code CLI installed and logged in on
|
|
@@ -40,46 +52,22 @@ without changing anything in the main repository.
|
|
|
40
52
|
(the profile's `shims/` directory). A deployed install with one published
|
|
41
53
|
`node_modules` needs no shims.
|
|
42
54
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
```sh
|
|
48
|
-
pnpm install && pnpm run build
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
2. Add the dependency in `$DSH_HOME/profiles/web/package.json`:
|
|
52
|
-
|
|
53
|
-
```json
|
|
54
|
-
"dependencies": {
|
|
55
|
-
"dsh-loop-engine": "1.0.0-rc2",
|
|
56
|
-
"...keep existing deps"
|
|
57
|
-
}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
The package is published on npm as `dsh-loop-engine`. For local
|
|
61
|
-
development, use a `file:` reference to your checkout instead of the version
|
|
62
|
-
string.
|
|
63
|
-
|
|
64
|
-
3. Append one composition row in `$DSH_HOME/profiles/web/cordis.patch.yml`:
|
|
65
|
-
|
|
66
|
-
```yaml
|
|
67
|
-
- insert:
|
|
68
|
-
- id: loop-engine
|
|
69
|
-
name: 'dsh-loop-engine'
|
|
70
|
-
```
|
|
55
|
+
> Switching engines rewrites a small managed block in `cordis.patch.yml`.
|
|
56
|
+
> Everything else you wrote in that file is preserved; only the plugin's own
|
|
57
|
+
> span changes.
|
|
71
58
|
|
|
72
|
-
|
|
59
|
+
### Local development
|
|
73
60
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
61
|
+
To work against a checkout instead of the published package, add it with a
|
|
62
|
+
`file:` reference (build it first — the package has no `prepare` script, so
|
|
63
|
+
pnpm will not build it for you):
|
|
77
64
|
|
|
78
|
-
|
|
65
|
+
```sh
|
|
66
|
+
cd /path/to/dsh-loop-engine && pnpm install && pnpm run build
|
|
67
|
+
dsh plugin --profile web add file:/path/to/dsh-loop-engine
|
|
68
|
+
```
|
|
79
69
|
|
|
80
|
-
|
|
81
|
-
> Everything else you wrote in that file is preserved; only the plugin's own
|
|
82
|
-
> span changes.
|
|
70
|
+
Or, from inside the checkout: `dsh plugin --profile web add .`
|
|
83
71
|
|
|
84
72
|
## Usage
|
|
85
73
|
|
|
@@ -91,9 +79,8 @@ without changing anything in the main repository.
|
|
|
91
79
|
- **Pi CLI** — the Pi (earendil-works/pi) driver.
|
|
92
80
|
3. Switching between these applies after restarting `dsh web`. To return
|
|
93
81
|
to the default, pick **In-process** and restart again.
|
|
94
|
-
4. To remove the plugin:
|
|
95
|
-
|
|
96
|
-
`pnpm install` and restart `dsh web`.
|
|
82
|
+
4. To remove the plugin: `dsh plugin --profile web remove dsh-loop-engine`, then
|
|
83
|
+
restart `dsh web`.
|
|
97
84
|
|
|
98
85
|
### Codex engine details
|
|
99
86
|
|
package/README.zh.md
CHANGED
|
@@ -11,9 +11,19 @@
|
|
|
11
11
|
- **Codex 执行。** 驱动 spawn `codex app-server` 并把其 token 级增量流式转发进会话日志,每一步一个 turn。
|
|
12
12
|
- **Pi 执行。** 驱动 spawn `pi --mode rpc` 并把其 `message_update` 增量流式转发进会话日志,每一步一个无状态 `new_session` + `prompt`。
|
|
13
13
|
- **可扩展。** 新增引擎只需加一个驱动模块 + 设置 schema 里加一个枚举值。
|
|
14
|
-
- **零主仓改动。** 仅作为 profile 依赖 +
|
|
14
|
+
- **零主仓改动。** 仅作为 profile 依赖 + 一个 bundle 层安装,无需改动主仓库。
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## 安装
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
dsh plugin --profile web add dsh-loop-engine
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
重启 `dsh web`,然后打开 **Settings → Loop engine**。
|
|
23
|
+
|
|
24
|
+
`dsh plugin add` 会把包装进 web profile,并注册为 bundle 层——包声明了 `dsh.bundle.patch`,所以无需手动改 `cordis.patch.yml`。包已发布到 npm,名称 `dsh-loop-engine`。
|
|
25
|
+
|
|
26
|
+
### 环境要求
|
|
17
27
|
|
|
18
28
|
- dsh `0.1.1-rc.2`(或 peer 包版本匹配的构建)。
|
|
19
29
|
- 使用 Claude Code 引擎时需要本机已安装并登录 Claude Code CLI。
|
|
@@ -21,42 +31,18 @@
|
|
|
21
31
|
- 使用 Pi 引擎时需要以 `pi` 要求的方式完成认证(其自身的 `~/.pi/agent/auth.json`,或提供方的 API-key 环境变量,如 `ANTHROPIC_API_KEY`)。
|
|
22
32
|
- 当 harness 以**源码方式**运行(如在 `deepseek-harness` 仓库内执行 `pnpm dsh`)时,profile 需要把本插件的 harness peer 包解析到主仓 **源码**,通过 profile 的 `shims/` 目录里的本地 `file:` 垫片实现;正式部署(单一发布版 `node_modules`)则无需垫片。
|
|
23
33
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
1. 构建插件:
|
|
27
|
-
|
|
28
|
-
```sh
|
|
29
|
-
pnpm install && pnpm run build
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
2. 在 `$DSH_HOME/profiles/web/package.json` 添加依赖:
|
|
33
|
-
|
|
34
|
-
```json
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"dsh-loop-engine": "1.0.0-rc2",
|
|
37
|
-
"...保留其余依赖"
|
|
38
|
-
}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
包已发布到 npm,名称 `dsh-loop-engine`。本地开发时改用指向你本地代码副本的 `file:` 引用。
|
|
42
|
-
|
|
43
|
-
3. 在 `$DSH_HOME/profiles/web/cordis.patch.yml` 追加一行组合:
|
|
44
|
-
|
|
45
|
-
```yaml
|
|
46
|
-
- insert:
|
|
47
|
-
- id: loop-engine
|
|
48
|
-
name: 'dsh-loop-engine'
|
|
49
|
-
```
|
|
34
|
+
> 切换引擎会重写 `cordis.patch.yml` 中一小段受管理的内容,文件里你写的其它部分都会保留,只改动插件自己的区间。
|
|
50
35
|
|
|
51
|
-
|
|
36
|
+
### 本地开发
|
|
52
37
|
|
|
53
|
-
|
|
54
|
-
cd $DSH_HOME/profiles/web && pnpm install
|
|
55
|
-
```
|
|
38
|
+
要加载本地 checkout 而非已发布包时,用 `file:` 引用添加(需先构建——本包没有 `prepare` 脚本,pnpm 不会替你构建):
|
|
56
39
|
|
|
57
|
-
|
|
40
|
+
```sh
|
|
41
|
+
cd /path/to/dsh-loop-engine && pnpm install && pnpm run build
|
|
42
|
+
dsh plugin --profile web add file:/path/to/dsh-loop-engine
|
|
43
|
+
```
|
|
58
44
|
|
|
59
|
-
|
|
45
|
+
或者,在 checkout 目录内直接 `dsh plugin --profile web add .`
|
|
60
46
|
|
|
61
47
|
## 使用方法
|
|
62
48
|
|
|
@@ -67,7 +53,7 @@
|
|
|
67
53
|
- **Codex CLI** —— OpenAI Codex 驱动;
|
|
68
54
|
- **Pi CLI** —— Pi(earendil-works/pi)驱动。
|
|
69
55
|
3. 引擎之间切换在**重启 `dsh web` 后生效**;切回默认时选择 **In-process** 并再次重启即可。
|
|
70
|
-
4.
|
|
56
|
+
4. 卸载插件:`dsh plugin --profile web remove dsh-loop-engine`,然后重启 `dsh web`。
|
|
71
57
|
|
|
72
58
|
### Codex 引擎的实现细节
|
|
73
59
|
|
package/cordis.patch.yml
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-loop-engine",
|
|
3
3
|
"description": "Web-switchable agent loop engine selection for the DeepSeek Harness - out-of-tree plugin (Claude Code / Codex drivers) maintained by @kuun993, zero main-repo changes",
|
|
4
|
-
"version": "1.0.0-
|
|
4
|
+
"version": "1.0.0-rc3",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
"lib/index.js",
|
|
30
30
|
"lib/invariant.js",
|
|
31
31
|
"lib/client.js",
|
|
32
|
-
"lib/types/**/*.d.ts"
|
|
32
|
+
"lib/types/**/*.d.ts",
|
|
33
|
+
"cordis.patch.yml"
|
|
33
34
|
],
|
|
34
35
|
"license": "MIT",
|
|
35
36
|
"scripts": {
|