dsh-approval-consult 1.1.0 → 1.1.1
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 +9 -3
- package/README.md +14 -7
- package/lib/client.js +2 -0
- package/lib/impl.js +9 -1
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/0tests/dsh-approval-consult/actions/workflows/ci.yml)
|
|
4
4
|
[](LICENSE)
|
|
5
|
+
[](https://www.npmjs.com/package/dsh-approval-consult)
|
|
5
6
|
|
|
6
7
|
> **English** · [中文主 README](README.md)
|
|
7
8
|
|
|
@@ -52,10 +53,15 @@ notes or reject blindly. This plugin adds a consultation panel on top of the app
|
|
|
52
53
|
|
|
53
54
|
Requires DSH Web `0.2.1-rc.2` (tested) and Node `>=20`.
|
|
54
55
|
|
|
55
|
-
Current version **v1.1.
|
|
56
|
-
The npm package is not published yet — install the release tarball:
|
|
56
|
+
Current version **v1.1.1**, published to npm ([`dsh-approval-consult`](https://www.npmjs.com/package/dsh-approval-consult)) and as a [GitHub release](https://github.com/0tests/dsh-approval-consult/releases/tag/v1.1.1).
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
```bash
|
|
59
|
+
npm install dsh-approval-consult
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Or install the release tarball:
|
|
63
|
+
|
|
64
|
+
1. Download `dsh-approval-consult-1.1.1.tgz` from
|
|
59
65
|
[Releases](https://github.com/0tests/dsh-approval-consult/releases/latest).
|
|
60
66
|
2. Open DSH Web → **Plugins** → **Add plugin** → **Install third-party plugin** and point it at the
|
|
61
67
|
tarball's absolute path (or the download URL directly).
|
package/README.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/0tests/dsh-approval-consult/actions/workflows/ci.yml)
|
|
4
4
|
[](LICENSE)
|
|
5
|
+
[](https://www.npmjs.com/package/dsh-approval-consult)
|
|
5
6
|
|
|
6
7
|
> [English](README.en.md) · 中文
|
|
7
8
|
>
|
|
@@ -36,25 +37,31 @@ Auto 审查(`@deepseek-ai/dsh-experimental-auto-review`)会在工具执行
|
|
|
36
37
|
|
|
37
38
|
## 安装
|
|
38
39
|
|
|
39
|
-
> 当前版本 **v1.1.
|
|
40
|
-
> npm
|
|
40
|
+
> 当前版本 **v1.1.1**,已发布到 npm([`dsh-approval-consult`](https://www.npmjs.com/package/dsh-approval-consult))和 [GitHub Release](https://github.com/0tests/dsh-approval-consult/releases/tag/v1.1.1)。
|
|
41
|
+
> `npm install dsh-approval-consult`,或让 Agent 用 `plugin_manager` 安装这个包名;下面也保留了 tarball / 本地目录两种方式。
|
|
41
42
|
|
|
42
|
-
### 方式 A
|
|
43
|
+
### 方式 A:npm
|
|
44
|
+
|
|
45
|
+
1. `npm install dsh-approval-consult`(或让 Agent 用 `plugin_manager` 的 `install_bundle` 安装 npm 包名);
|
|
46
|
+
2. 在 DSH Web 的「插件」里启用;
|
|
47
|
+
3. 重启一次 `dsh web` 更稳。
|
|
48
|
+
|
|
49
|
+
### 方式 B:从 Release 安装(tarball)
|
|
43
50
|
|
|
44
51
|
1. 在 [Releases](https://github.com/0tests/dsh-approval-consult/releases/latest) 下载
|
|
45
|
-
`dsh-approval-consult-1.1.
|
|
52
|
+
`dsh-approval-consult-1.1.1.tgz`;
|
|
46
53
|
2. 打开 DSH Web → 左侧「插件」→「添加插件」→「安装第三方插件」,填这个 tarball 的绝对路径,
|
|
47
54
|
或直接填下载链接
|
|
48
|
-
`https://github.com/0tests/dsh-approval-consult/releases/download/v1.1.
|
|
55
|
+
`https://github.com/0tests/dsh-approval-consult/releases/download/v1.1.1/dsh-approval-consult-1.1.1.tgz`;
|
|
49
56
|
3. 安装完成后点「立即启用」,重启一次 `dsh web` 更稳。
|
|
50
57
|
|
|
51
|
-
### 方式
|
|
58
|
+
### 方式 C:本地目录(源码 / 开发)
|
|
52
59
|
|
|
53
60
|
1. `git clone https://github.com/0tests/dsh-approval-consult`;
|
|
54
61
|
2. 打开 DSH Web →「插件」→「添加插件」→「安装第三方插件」,输入该目录的绝对路径;
|
|
55
62
|
3. 安装完成后点「立即启用」。
|
|
56
63
|
|
|
57
|
-
### 方式
|
|
64
|
+
### 方式 D:CLI / 会话内
|
|
58
65
|
|
|
59
66
|
让 Agent 用 `plugin_manager` 的 `install_bundle` 安装该 tarball / 目录 / npm 包(需要审批权限)。
|
|
60
67
|
|
package/lib/client.js
CHANGED
|
@@ -960,6 +960,8 @@ window.__ModuleLoader__.load({
|
|
|
960
960
|
injectError: turn.injectError ?? null,
|
|
961
961
|
truncated: turn.truncated === true,
|
|
962
962
|
jobId: typeof turn.jobId === 'string' && turn.jobId.length > 0 ? turn.jobId : null,
|
|
963
|
+
/** 这条问答附带的图片元数据(/context 刷新后必须保留,否则缩略图会消失)。 */
|
|
964
|
+
attachments: Array.isArray(turn.attachments) ? turn.attachments : [],
|
|
963
965
|
}))
|
|
964
966
|
: []
|
|
965
967
|
return {
|
package/lib/impl.js
CHANGED
|
@@ -59,6 +59,14 @@ const SIDE_TOOLCALL_CORRECTION =
|
|
|
59
59
|
const INJECT_SOURCE_KIND = 'approval-consult'
|
|
60
60
|
const CONTEXT_SUMMARY_MAX_CHARS = 120
|
|
61
61
|
const MAX_BODY_BYTES = 64 * 1024
|
|
62
|
+
/** 插件版本(诊断用):从 package.json 读取,避免手写版本号漂移。 */
|
|
63
|
+
const PLUGIN_VERSION = (() => {
|
|
64
|
+
try {
|
|
65
|
+
return JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version
|
|
66
|
+
} catch {
|
|
67
|
+
return '0.0.0'
|
|
68
|
+
}
|
|
69
|
+
})()
|
|
62
70
|
/** 图片上传请求体上限(再受 DSH 附件服务的 imageLimits 约束)。 */
|
|
63
71
|
const MAX_ATTACHMENT_BODY_BYTES = 8 * 1024 * 1024
|
|
64
72
|
/** 附件引用登记的有效期(审批结束后立即失效,这里是兜底)。 */
|
|
@@ -2994,7 +3002,7 @@ export function apply(ctx, config, runtime) {
|
|
|
2994
3002
|
})()
|
|
2995
3003
|
return {
|
|
2996
3004
|
ok: true,
|
|
2997
|
-
version:
|
|
3005
|
+
version: PLUGIN_VERSION,
|
|
2998
3006
|
uptimeMs: Math.round(process.uptime() * 1000),
|
|
2999
3007
|
shim,
|
|
3000
3008
|
config: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-approval-consult",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Approval consultation panel for DeepSeek Harness: while a tool call waits for approval, ask the executor AI and the auto-review AI independently, in two isolated channels with prompt-cache reuse.",
|