@deepseek-ai/dsh-experimental-auto-review 0.2.1-alpha.1 → 0.2.1-alpha.3
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.i18n.yaml +4 -4
- package/README.md +3 -1
- package/README.zh.md +3 -1
- package/lib/index.js +4 -5
- package/package.json +40 -38
package/README.i18n.yaml
CHANGED
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
en: d152484eb41ac6b4
|
|
16
16
|
zh: 09388d293f9be9cb
|
|
17
17
|
/deepseek-ai-dsh-experimental-auto-review/use-this-package:
|
|
18
|
-
en:
|
|
19
|
-
zh:
|
|
18
|
+
en: 8f9e85817f05aa4d
|
|
19
|
+
zh: f60136fb39abcf29
|
|
20
20
|
/deepseek-ai-dsh-experimental-auto-review/use-this-package/install-into-a-profile:
|
|
21
|
-
en:
|
|
22
|
-
zh:
|
|
21
|
+
en: cf146a773e8c7010
|
|
22
|
+
zh: 57f7e9be7b257fcc
|
|
23
23
|
/deepseek-ai-dsh-experimental-auto-review/use-this-package/what-you-get:
|
|
24
24
|
en: 556e89c0055ae9cc
|
|
25
25
|
zh: 75afbcb9a2af6467
|
package/README.md
CHANGED
|
@@ -25,6 +25,8 @@ Add Auto review to the current-session permission pickers in a Web profile. Befo
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## Use this package
|
|
27
27
|
|
|
28
|
+
The review environment records the Session's current working directory for the pending action.
|
|
29
|
+
|
|
28
30
|
### Install into a profile
|
|
29
31
|
|
|
30
32
|
From this source checkout, install the package into the Web profile through the existing CLI:
|
|
@@ -33,7 +35,7 @@ From this source checkout, install the package into the Web profile through the
|
|
|
33
35
|
pnpm dsh plugin --profile web add ./packages/experimental/auto-review
|
|
34
36
|
```
|
|
35
37
|
|
|
36
|
-
The CLI initializes the profile when needed and appends this package's declared patch after the base and Web layers. Reconciliation activates the patch as a profile layer; a package without `dsh.bundle.patch` is only an installed dependency. Select `Auto review` with its
|
|
38
|
+
The CLI initializes the profile when needed and appends this package's declared patch after the base and Web layers. Reconciliation activates the patch as a profile layer; a package without `dsh.bundle.patch` is only an installed dependency. Select `Auto review` with its `EXP` badge in the composer menu or `/permission` picker and confirm the current-session risk dialog. An explicit `/permission auto` command switches directly. General settings and future-session defaults do not offer Auto.
|
|
37
39
|
|
|
38
40
|
Remove the layer through the same CLI:
|
|
39
41
|
|
package/README.zh.md
CHANGED
|
@@ -25,6 +25,8 @@ kind: "package-bundle"
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## 使用本包
|
|
27
27
|
|
|
28
|
+
评审环境记录待执行操作对应的 Session 当前工作目录。
|
|
29
|
+
|
|
28
30
|
### 安装到 profile
|
|
29
31
|
|
|
30
32
|
从源码 checkout 通过既有 CLI 将包安装到 Web profile:
|
|
@@ -33,7 +35,7 @@ kind: "package-bundle"
|
|
|
33
35
|
pnpm dsh plugin --profile web add ./packages/experimental/auto-review
|
|
34
36
|
```
|
|
35
37
|
|
|
36
|
-
CLI 会在需要时初始化 profile,并将本包声明的 patch 追加到 base 与 Web 层之后。Reconciliation 将 patch 激活为 profile 层;没有 `dsh.bundle.patch` 的包只是已安装依赖。在 composer
|
|
38
|
+
CLI 会在需要时初始化 profile,并将本包声明的 patch 追加到 base 与 Web 层之后。Reconciliation 将 patch 激活为 profile 层;没有 `dsh.bundle.patch` 的包只是已安装依赖。在 composer 菜单或 `/permission` 选择器中选择带 `EXP` 标记的「自动审查」,并确认当前会话风险对话框。显式 `/permission auto` 命令直接切换。通用设置与未来会话默认值不提供 Auto。
|
|
37
39
|
|
|
38
40
|
通过同一 CLI 移除此层:
|
|
39
41
|
|
package/lib/index.js
CHANGED
|
@@ -47,7 +47,8 @@ const inject = [
|
|
|
47
47
|
"llm",
|
|
48
48
|
"permissionPresets",
|
|
49
49
|
"sessions",
|
|
50
|
-
"tools"
|
|
50
|
+
"tools",
|
|
51
|
+
"workingDirectory"
|
|
51
52
|
];
|
|
52
53
|
/** Return JSON text for one immutable logged value. */
|
|
53
54
|
function json(value) {
|
|
@@ -211,14 +212,12 @@ function ptcAction(exec, start, visibleParentKeys) {
|
|
|
211
212
|
* @param exec - immutable pending execution.
|
|
212
213
|
* @returns the exact route and four data sections paired with {@link REVIEW_POLICY}.
|
|
213
214
|
*/
|
|
214
|
-
function snapshotAutoReview(agent, exec) {
|
|
215
|
+
function snapshotAutoReview(agent, exec, cwd) {
|
|
215
216
|
const { session } = agent;
|
|
216
217
|
const events = session.snapshotEvents();
|
|
217
218
|
const nodes = [...session.surface.nodes];
|
|
218
219
|
const header = session.requestHeader();
|
|
219
220
|
if (header === void 0 || header.config.provider.length === 0 || header.config.model.length === 0) throw new Error("auto-review: no complete request-header route is available");
|
|
220
|
-
const cwd = session.header.cwd;
|
|
221
|
-
if (cwd === void 0 || cwd.length === 0) throw new Error("auto-review: the session has no working directory");
|
|
222
221
|
const nativeCalls = events.filter((event) => event.type === "tool/call");
|
|
223
222
|
const { starts, openStep: currentStep } = scopePtcStarts(events);
|
|
224
223
|
const initialPromptSeq = directParentInitialPromptSeq(agent, events);
|
|
@@ -397,7 +396,7 @@ async function readDecision(stream) {
|
|
|
397
396
|
}
|
|
398
397
|
/** Review one frozen pending action with the fixed policy and current LLM route. */
|
|
399
398
|
async function classifyRisk(ctx, agent, exec, signal) {
|
|
400
|
-
const snapshot = snapshotAutoReview(agent, exec);
|
|
399
|
+
const snapshot = snapshotAutoReview(agent, exec, await ctx.workingDirectory.ensure(agent, signal));
|
|
401
400
|
const options = deepFreeze({
|
|
402
401
|
provider: snapshot.provider,
|
|
403
402
|
model: snapshot.model,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-experimental-auto-review",
|
|
3
3
|
"description": "Per-tool LLM authorization review for the DeepSeek Harness Auto permission preset",
|
|
4
|
-
"version": "0.2.1-alpha.
|
|
4
|
+
"version": "0.2.1-alpha.3",
|
|
5
5
|
"icon": "./icon.svg",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -30,47 +30,49 @@
|
|
|
30
30
|
],
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@deepseek-ai/dsh-agent": "0.2.1-alpha.
|
|
34
|
-
"@deepseek-ai/dsh-agent-instructions": "0.2.1-alpha.
|
|
35
|
-
"@deepseek-ai/dsh-llm": "0.2.1-alpha.
|
|
36
|
-
"@deepseek-ai/dsh-permission-presets": "0.2.1-alpha.
|
|
37
|
-
"@deepseek-ai/dsh-session": "0.2.1-alpha.
|
|
38
|
-
"@deepseek-ai/dsh-tools": "0.2.1-alpha.
|
|
39
|
-
"@deepseek-ai/cordis": "~4.0.5-alpha.
|
|
33
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.3",
|
|
34
|
+
"@deepseek-ai/dsh-agent-instructions": "0.2.1-alpha.3",
|
|
35
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.3",
|
|
36
|
+
"@deepseek-ai/dsh-permission-presets": "0.2.1-alpha.3",
|
|
37
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.3",
|
|
38
|
+
"@deepseek-ai/dsh-tools": "0.2.1-alpha.3",
|
|
39
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2",
|
|
40
|
+
"@deepseek-ai/dsh-working-directory": "0.2.1-alpha.3"
|
|
40
41
|
},
|
|
41
42
|
"dependencies": {
|
|
42
|
-
"@deepseek-ai/dsh-util-values": "0.2.1-alpha.
|
|
43
|
+
"@deepseek-ai/dsh-util-values": "0.2.1-alpha.3"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"@deepseek-ai/dsh-agent": "0.2.1-alpha.
|
|
46
|
-
"@deepseek-ai/dsh-agent-
|
|
47
|
-
"@deepseek-ai/dsh-agent-loop
|
|
48
|
-
"@deepseek-ai/dsh-
|
|
49
|
-
"@deepseek-ai/dsh-
|
|
50
|
-
"@deepseek-ai/dsh-
|
|
51
|
-
"@deepseek-ai/dsh-fs-local": "0.2.1-alpha.
|
|
52
|
-
"@deepseek-ai/dsh-fs-observation-policy": "0.2.1-alpha.
|
|
53
|
-
"@deepseek-ai/dsh-fs-sandbox": "0.2.1-alpha.
|
|
54
|
-
"@deepseek-ai/dsh-llm": "0.2.1-alpha.
|
|
55
|
-
"@deepseek-ai/dsh-llm-deepseek
|
|
56
|
-
"@deepseek-ai/dsh-
|
|
57
|
-
"@deepseek-ai/dsh-
|
|
58
|
-
"@deepseek-ai/dsh-
|
|
59
|
-
"@deepseek-ai/dsh-
|
|
60
|
-
"@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.
|
|
61
|
-
"@deepseek-ai/dsh-session": "0.2.1-alpha.
|
|
62
|
-
"@deepseek-ai/dsh-
|
|
63
|
-
"@deepseek-ai/dsh-
|
|
64
|
-
"@deepseek-ai/dsh-shell": "0.2.1-alpha.
|
|
65
|
-
"@deepseek-ai/dsh-
|
|
66
|
-
"@deepseek-ai/dsh-
|
|
67
|
-
"@deepseek-ai/dsh-
|
|
68
|
-
"@deepseek-ai/dsh-tool-
|
|
69
|
-
"@deepseek-ai/dsh-
|
|
70
|
-
"@deepseek-ai/dsh-tool-subagent": "0.2.1-alpha.
|
|
71
|
-
"@deepseek-ai/dsh-
|
|
72
|
-
"@deepseek-ai/
|
|
73
|
-
"@deepseek-ai/
|
|
46
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.3",
|
|
47
|
+
"@deepseek-ai/dsh-agent-instructions": "0.2.1-alpha.3",
|
|
48
|
+
"@deepseek-ai/dsh-agent-loop": "0.2.1-alpha.3",
|
|
49
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-alpha.3",
|
|
50
|
+
"@deepseek-ai/dsh-bash-sandbox": "0.2.1-alpha.3",
|
|
51
|
+
"@deepseek-ai/dsh-compaction": "0.2.1-alpha.3",
|
|
52
|
+
"@deepseek-ai/dsh-fs-local": "0.2.1-alpha.3",
|
|
53
|
+
"@deepseek-ai/dsh-fs-observation-policy": "0.2.1-alpha.3",
|
|
54
|
+
"@deepseek-ai/dsh-fs-sandbox": "0.2.1-alpha.3",
|
|
55
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.3",
|
|
56
|
+
"@deepseek-ai/dsh-llm-deepseek": "0.2.1-alpha.3",
|
|
57
|
+
"@deepseek-ai/dsh-llm-deepseek-api-key": "0.2.1-alpha.3",
|
|
58
|
+
"@deepseek-ai/dsh-permission-presets": "0.2.1-alpha.3",
|
|
59
|
+
"@deepseek-ai/dsh-ptc-runtime-node": "0.2.1-alpha.3",
|
|
60
|
+
"@deepseek-ai/dsh-sandbox": "0.2.1-alpha.3",
|
|
61
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.3",
|
|
62
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.3",
|
|
63
|
+
"@deepseek-ai/dsh-session-projection": "0.2.1-alpha.3",
|
|
64
|
+
"@deepseek-ai/dsh-shell": "0.2.1-alpha.3",
|
|
65
|
+
"@deepseek-ai/dsh-shell-env": "0.2.1-alpha.3",
|
|
66
|
+
"@deepseek-ai/dsh-subagent": "0.2.1-alpha.3",
|
|
67
|
+
"@deepseek-ai/dsh-subprocess-local": "0.2.1-alpha.3",
|
|
68
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.3",
|
|
69
|
+
"@deepseek-ai/dsh-tool-bash": "0.2.1-alpha.3",
|
|
70
|
+
"@deepseek-ai/dsh-tool-fs": "0.2.1-alpha.3",
|
|
71
|
+
"@deepseek-ai/dsh-tool-subagent": "0.2.1-alpha.3",
|
|
72
|
+
"@deepseek-ai/dsh-tools": "0.2.1-alpha.3",
|
|
73
|
+
"@deepseek-ai/dsh-user-approval": "0.2.1-alpha.3",
|
|
74
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2",
|
|
75
|
+
"@deepseek-ai/dsh-working-directory": "0.2.1-alpha.3"
|
|
74
76
|
},
|
|
75
77
|
"publishConfig": {
|
|
76
78
|
"access": "public"
|