paseo-dsh-direct 0.1.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/LICENSE +21 -0
- package/README.md +64 -0
- package/README.zh.md +64 -0
- package/dsh.svg +11 -0
- package/index.client.tsx +6 -0
- package/index.server.ts +19 -0
- package/package.json +80 -0
- package/paseo-plugin.json +10 -0
- package/scripts/build.mjs +31 -0
- package/scripts/install-lefthook.mjs +743 -0
- package/server/bridge-client.ts +416 -0
- package/server/dsh/bridge.ts +176 -0
- package/server/dsh/host.ts +204 -0
- package/server/dsh/service.ts +890 -0
- package/server/dsh-version.ts +71 -0
- package/server/plugin-version.ts +7 -0
- package/server/prompt-content.ts +120 -0
- package/server/provider.ts +1101 -0
- package/server/timeline.ts +487 -0
- package/server/turn-end.ts +41 -0
- package/server/values.ts +20 -0
- package/server/version-line.ts +50 -0
- package/shared/bridge-protocol.ts +232 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jecvay
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# paseo-dsh-direct
|
|
2
|
+
|
|
3
|
+
English | [中文](README.zh.md)
|
|
4
|
+
|
|
5
|
+
`paseo-dsh-direct` connects a local [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`) to [Paseo](https://github.com/getpaseo/paseo) through a Direct Provider.
|
|
6
|
+
|
|
7
|
+
Version `0.1.3` registers the provider `dsh-pi`, shown in Paseo as **DeepSeek Harness**. The plugin id is `paseo-dsh-direct`.
|
|
8
|
+
|
|
9
|
+
## Install locally
|
|
10
|
+
|
|
11
|
+
The validated alpha combination is Paseo `0.9.2`, DSH `0.1.7-rc.2`, and a supported Node.js runtime. DSH must already be installed on the Paseo Daemon host; no other DSH add-on is needed.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
git clone https://github.com/Jecvay/paseo-dsh-direct.git
|
|
15
|
+
cd paseo-dsh-direct
|
|
16
|
+
npm ci
|
|
17
|
+
npm run build
|
|
18
|
+
paseo plugin install "$PWD"
|
|
19
|
+
paseo plugin ls
|
|
20
|
+
paseo provider models dsh-pi
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The same local source can be installed directly with `paseo plugin install /absolute/path/to/paseo-dsh-direct` after building. Git installation is available for an existing remote ref:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
paseo plugin add Jecvay/paseo-dsh-direct --ref <tag-or-commit>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Versioning
|
|
30
|
+
|
|
31
|
+
The plugin's `major.minor` tracks the dsh line it supports (`0.1.x` works with dsh `0.1.*`); the patch number is the plugin's own release count and does not follow dsh. Install the tag that matches your local dsh version.
|
|
32
|
+
|
|
33
|
+
| Plugin line | dsh line |
|
|
34
|
+
|---|---|
|
|
35
|
+
| `0.1.x` | `0.1.*` |
|
|
36
|
+
|
|
37
|
+
See the [compatibility notes](docs/compatibility.md) for the full rule and the dsh versions actually tested.
|
|
38
|
+
|
|
39
|
+
## Use
|
|
40
|
+
|
|
41
|
+
Create a conversation with the **DeepSeek Harness** provider. Models and presets come from the configured DSH profile. Existing native DSH sessions are available through Paseo's **Import session** flow and retain their native session identity.
|
|
42
|
+
|
|
43
|
+
The provider supports streamed assistant and reasoning output, tool execution and approval, user questions, model/preset configuration, interruption, and session recovery. It starts DSH with its own `paseo` profile and does not modify Paseo or DSH core.
|
|
44
|
+
|
|
45
|
+
The plugin uses the DSH profile `paseo`. On first start it creates that profile from DSH's official `web` template (`~/.dsh/profiles/paseo`, or under `$DSH_HOME` when set). Model routes, the default model, and permission presets go in `~/.dsh/profiles/paseo/cordis.patch.yml`. Set `PASEO_DSH_EXECUTABLE` to use a different `dsh` executable, or `PASEO_DSH_PROFILE` to use another existing profile; a profile named there is not created automatically. If the Paseo Daemon has plugin loading disabled, enable `pluginsEnabled` in its configuration before installing the plugin.
|
|
46
|
+
|
|
47
|
+
If a native session is still held by another DSH client (such as a terminal UI), release it there before importing or resuming it from Paseo.
|
|
48
|
+
|
|
49
|
+
## Development
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npm ci
|
|
53
|
+
npm run build
|
|
54
|
+
npm run typecheck
|
|
55
|
+
npm test
|
|
56
|
+
npm run verify:notes
|
|
57
|
+
npm run verify:docs
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Read the [documentation index](docs/README.md), [English installation guide](docs/en/installation.md), [English compatibility notes](docs/en/compatibility.md), or the [Chinese documentation](README.zh.md).
|
|
61
|
+
|
|
62
|
+
## License
|
|
63
|
+
|
|
64
|
+
[MIT](LICENSE)
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# paseo-dsh-direct
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 中文
|
|
4
|
+
|
|
5
|
+
`paseo-dsh-direct` 通过 Direct Provider,把本机的 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(`dsh`)接入 [Paseo](https://github.com/getpaseo/paseo)。
|
|
6
|
+
|
|
7
|
+
当前版本为 `0.1.3`。插件注册 Provider `dsh-pi`,在 Paseo 中显示为 **DeepSeek Harness**;插件标识为 `paseo-dsh-direct`。
|
|
8
|
+
|
|
9
|
+
## 本地安装
|
|
10
|
+
|
|
11
|
+
当前 alpha 验证组合为 Paseo `0.9.2`、DSH `0.1.7-rc.2`,以及受支持的 Node.js 运行时。运行 Paseo Daemon 的主机需要预先装好 DSH,不需要额外的 DSH 扩展包。
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
git clone https://github.com/Jecvay/paseo-dsh-direct.git
|
|
15
|
+
cd paseo-dsh-direct
|
|
16
|
+
npm ci
|
|
17
|
+
npm run build
|
|
18
|
+
paseo plugin install "$PWD"
|
|
19
|
+
paseo plugin ls
|
|
20
|
+
paseo provider models dsh-pi
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
构建后也可以直接安装本地源码:`paseo plugin install /absolute/path/to/paseo-dsh-direct`。从 Git 安装已有远端 ref:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
paseo plugin add Jecvay/paseo-dsh-direct --ref <tag-or-commit>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 版本号
|
|
30
|
+
|
|
31
|
+
插件版本号的 `major.minor` 跟随它支持的 dsh 线(`0.1.x` 对应 dsh `0.1.*`);最后一位是插件自己的发布计数,不跟 dsh 走。按本机的 dsh 版本选装对应 tag。
|
|
32
|
+
|
|
33
|
+
| 插件版本线 | dsh 版本线 |
|
|
34
|
+
|---|---|
|
|
35
|
+
| `0.1.x` | `0.1.*` |
|
|
36
|
+
|
|
37
|
+
完整规则和已实测的 dsh 版本见[兼容性说明](docs/compatibility.md)。
|
|
38
|
+
|
|
39
|
+
## 使用
|
|
40
|
+
|
|
41
|
+
新建对话时选择 **DeepSeek Harness**。模型和 preset 来自已配置的 DSH profile。已有原生 DSH 会话可通过 Paseo 的 **Import session** 导入,并保留原生会话标识。
|
|
42
|
+
|
|
43
|
+
Provider 支持连续正文和思考输出、工具执行与审批、用户问答、模型和 preset 配置、中断及会话恢复。它用插件专用的 `paseo` profile 启动 DSH,不修改 Paseo 或 DSH 核心。
|
|
44
|
+
|
|
45
|
+
插件使用名为 `paseo` 的 DSH profile。首次启动时,插件用 DSH 官方的 `web` 模板自动创建它(位置是 `~/.dsh/profiles/paseo`;设置了 `$DSH_HOME` 时在其下)。模型路由、默认模型和权限预设写在 `~/.dsh/profiles/paseo/cordis.patch.yml`。可通过 `PASEO_DSH_EXECUTABLE` 指定其他 `dsh` 可执行文件,通过 `PASEO_DSH_PROFILE` 改用另一个已存在的 profile;这样指定的 profile 不会被自动创建。如果 Paseo Daemon 默认关闭插件加载,请先在配置中启用 `pluginsEnabled`。
|
|
46
|
+
|
|
47
|
+
如果原生会话仍被另一个 DSH 客户端(如终端界面)占用,请先在那里释放,再从 Paseo 导入或恢复。
|
|
48
|
+
|
|
49
|
+
## 开发
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npm ci
|
|
53
|
+
npm run build
|
|
54
|
+
npm run typecheck
|
|
55
|
+
npm test
|
|
56
|
+
npm run verify:notes
|
|
57
|
+
npm run verify:docs
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
参阅[文档索引](docs/README.md)、[兼容性说明](docs/compatibility.md)、[插件开发与验证](docs/plugin-guide.md)和 [Alpha 验收规范](docs/alpha-acceptance.md)。
|
|
61
|
+
|
|
62
|
+
## 许可
|
|
63
|
+
|
|
64
|
+
[MIT](LICENSE)
|
package/dsh.svg
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="DeepSeek Harness">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="wave" x1="8" y1="10" x2="56" y2="54" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop stop-color="#6A8DFF"/>
|
|
5
|
+
<stop offset="1" stop-color="#3158E6"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<path fill="url(#wave)" d="M8 34c7-13 18-20 33-20 6 0 11 1 15 4-2 13-8 23-18 29-8 5-17 6-27 3 7-2 12-6 15-11-7 2-13 0-18-5Z"/>
|
|
9
|
+
<circle cx="43" cy="25" r="3" fill="#fff"/>
|
|
10
|
+
<path d="M13 42c8 4 17 3 25-2" fill="none" stroke="#fff" stroke-width="3" stroke-linecap="round" opacity=".9"/>
|
|
11
|
+
</svg>
|
package/index.client.tsx
ADDED
package/index.server.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PluginServerContext } from "@getpaseo/plugin/server";
|
|
2
|
+
import { launchDshBridge } from "./server/bridge-client.js";
|
|
3
|
+
import { DSH_BRIDGE_SOURCE } from "./server/generated-bridge.js";
|
|
4
|
+
import { createDshProvider } from "./server/provider.js";
|
|
5
|
+
|
|
6
|
+
export default function contribute(server: PluginServerContext) {
|
|
7
|
+
server.registerProvider(
|
|
8
|
+
createDshProvider({
|
|
9
|
+
createBridge: (launch) =>
|
|
10
|
+
launchDshBridge({
|
|
11
|
+
...launch,
|
|
12
|
+
bridgeSource: DSH_BRIDGE_SOURCE,
|
|
13
|
+
executable: process.env.PASEO_DSH_EXECUTABLE,
|
|
14
|
+
profile: process.env.PASEO_DSH_PROFILE,
|
|
15
|
+
}),
|
|
16
|
+
}),
|
|
17
|
+
);
|
|
18
|
+
return () => {};
|
|
19
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "paseo-dsh-direct",
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "DeepSeek Harness Direct Provider Plugin for Paseo",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/Jecvay/paseo-dsh-direct.git"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"paseo-plugin",
|
|
12
|
+
"paseo",
|
|
13
|
+
"dsh",
|
|
14
|
+
"deepseek-harness",
|
|
15
|
+
"provider"
|
|
16
|
+
],
|
|
17
|
+
"type": "module",
|
|
18
|
+
"files": [
|
|
19
|
+
"index.server.ts",
|
|
20
|
+
"index.client.tsx",
|
|
21
|
+
"server",
|
|
22
|
+
"shared",
|
|
23
|
+
"scripts/build.mjs",
|
|
24
|
+
"scripts/install-lefthook.mjs",
|
|
25
|
+
"paseo-plugin.json",
|
|
26
|
+
"dsh.svg",
|
|
27
|
+
"!server/**/*.test.ts",
|
|
28
|
+
"!server/generated-bridge.ts",
|
|
29
|
+
"!server/generated-version.ts"
|
|
30
|
+
],
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@getpaseo/client": "0.9.2",
|
|
33
|
+
"@getpaseo/protocol": "0.9.2",
|
|
34
|
+
"react": "~19.1.0",
|
|
35
|
+
"react-native": ">=0.81.5"
|
|
36
|
+
},
|
|
37
|
+
"peerDependenciesMeta": {
|
|
38
|
+
"@getpaseo/client": {
|
|
39
|
+
"optional": true
|
|
40
|
+
},
|
|
41
|
+
"@getpaseo/protocol": {
|
|
42
|
+
"optional": true
|
|
43
|
+
},
|
|
44
|
+
"react": {
|
|
45
|
+
"optional": true
|
|
46
|
+
},
|
|
47
|
+
"react-native": {
|
|
48
|
+
"optional": true
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@getpaseo/plugin": "0.9.2",
|
|
53
|
+
"@types/mdast": "^4.0.4",
|
|
54
|
+
"@types/node": "^24.0.0",
|
|
55
|
+
"esbuild": "^0.25.0",
|
|
56
|
+
"lefthook": "^2.1.9",
|
|
57
|
+
"mdast-util-from-markdown": "^2.0.3",
|
|
58
|
+
"mdast-util-gfm": "^3.1.0",
|
|
59
|
+
"micromark-extension-gfm": "^3.0.0",
|
|
60
|
+
"tsx": "^4.22.4",
|
|
61
|
+
"typescript": "^5.9.3",
|
|
62
|
+
"zod": "^4.4.3"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"build": "node scripts/build.mjs",
|
|
66
|
+
"smoke:bridge": "npm run build && tsx scripts/smoke-bridge.ts",
|
|
67
|
+
"board": "tsx scripts/board.ts",
|
|
68
|
+
"board:poll": "tsx scripts/board-poll.ts",
|
|
69
|
+
"typecheck": "npm run typecheck:shared && npm run typecheck:server && npm run typecheck:client && npm run typecheck:scripts",
|
|
70
|
+
"typecheck:shared": "tsc -p tsconfig.shared.json",
|
|
71
|
+
"typecheck:server": "tsc -p tsconfig.server.json",
|
|
72
|
+
"typecheck:client": "tsc -p tsconfig.client.json",
|
|
73
|
+
"typecheck:scripts": "tsc -p tsconfig.scripts.json",
|
|
74
|
+
"test": "tsx --test \"server/**/*.test.ts\"",
|
|
75
|
+
"postinstall": "node scripts/install-lefthook.mjs",
|
|
76
|
+
"verify:notes": "tsx scripts/verify-agent-note-classification.ts && tsx scripts/verify-agent-note-format.ts && tsx scripts/verify-archived-agent-notes.ts",
|
|
77
|
+
"verify:docs": "tsx scripts/verify-md-links.ts && tsx scripts/verify-doc-refs.ts",
|
|
78
|
+
"verify-archived-agent-notes": "tsx scripts/verify-archived-agent-notes.ts"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises'
|
|
2
|
+
import { build } from 'esbuild'
|
|
3
|
+
|
|
4
|
+
const result = await build({
|
|
5
|
+
entryPoints: ['server/dsh/bridge.ts'],
|
|
6
|
+
outfile: 'dist/dsh-bridge.mjs',
|
|
7
|
+
bundle: true,
|
|
8
|
+
format: 'esm',
|
|
9
|
+
platform: 'node',
|
|
10
|
+
target: 'node22',
|
|
11
|
+
sourcemap: false,
|
|
12
|
+
legalComments: 'none',
|
|
13
|
+
write: false,
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
const bridge = result.outputFiles.find(file => file.path.endsWith('/dsh-bridge.mjs'))
|
|
17
|
+
if (!bridge) throw new Error('esbuild did not produce dist/dsh-bridge.mjs')
|
|
18
|
+
await mkdir('dist', { recursive: true })
|
|
19
|
+
await writeFile('dist/dsh-bridge.mjs', bridge.contents)
|
|
20
|
+
await writeFile(
|
|
21
|
+
'server/generated-bridge.ts',
|
|
22
|
+
`// Generated by npm run build; do not edit.\nexport const DSH_BRIDGE_SOURCE = ${JSON.stringify(bridge.text)};\n`,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
// Paseo only loads plugin modules from client/, server/ and shared/, so the
|
|
26
|
+
// plugin version is baked in here instead of importing package.json at runtime.
|
|
27
|
+
const { version } = JSON.parse(await readFile('package.json', 'utf8'))
|
|
28
|
+
await writeFile(
|
|
29
|
+
'server/generated-version.ts',
|
|
30
|
+
`// Generated by npm run build; do not edit.\nexport const PLUGIN_VERSION = ${JSON.stringify(version)};\n`,
|
|
31
|
+
)
|