@deepseek-ai/dsh-experimental-auto-review 0.2.0-rc.2 → 0.2.1-alpha.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/README.i18n.yaml +4 -4
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/lib/index.js +4 -5
- package/package.json +40 -38
package/README.i18n.yaml
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
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
21
|
en: 63f8f1baa0fb2655
|
|
22
22
|
zh: 6bc64160f6d02114
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
en: 556e89c0055ae9cc
|
|
25
25
|
zh: 75afbcb9a2af6467
|
|
26
26
|
/deepseek-ai-dsh-experimental-auto-review/understand-the-implementation:
|
|
27
|
-
en:
|
|
28
|
-
zh:
|
|
27
|
+
en: 36950514e3b99263
|
|
28
|
+
zh: 8d2b8252cdc8d75e
|
|
29
29
|
/deepseek-ai-dsh-experimental-auto-review/further-exploration:
|
|
30
30
|
en: 8b81d32ea370ecd3
|
|
31
31
|
zh: dc53ff4da78232ac
|
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:
|
|
@@ -61,8 +63,6 @@ The reviewer reconstructs five sections from the current Session surface and pen
|
|
|
61
63
|
|
|
62
64
|
Unloading closes selection and review admission, migrates live Auto Sessions to Full access through the existing preset writer, then aborts and drains reviews before withdrawing the listener and contribution. The migration writes the `never` approval policy through the Session writer without queuing a policy-change notice; the model sees the new policy in the next runtime-context snapshot. The sandbox value and persistent terminals survive the migration. A persisted Auto Session cannot publish without the complete integration; reopening it after installation is an explicit user action. Reinstalling the layer restores the option but does not switch live Sessions back to Auto.
|
|
63
65
|
|
|
64
|
-
No runtime invariant companion is published: this single effect owns selection admission, review enrollment, cancellation, and cleanup; it has no independent observation that can diverge from those owned operations.
|
|
65
|
-
|
|
66
66
|
</details>
|
|
67
67
|
|
|
68
68
|
-----
|
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:
|
|
@@ -61,8 +63,6 @@ Reviewer 从当前 Session surface 与待执行调用重建五个分区:固定
|
|
|
61
63
|
|
|
62
64
|
卸载时先关闭选择与 review admission,经由既有 preset writer 将存活 Auto Session 迁移到 Full access,再中止并等待在途 review 结清,最后撤回 listener 与 contribution。迁移通过 Session writer 写入 `never` 审批策略,不排入策略变更通知;模型在下一次 runtime-context 快照中看到新策略。沙箱值与持久终端在迁移中保持不变。持久 Auto Session 缺少完整 integration 时不能发布;安装后重新打开需要用户显式操作。重装只恢复选项,不把存活 Session 切回 Auto。
|
|
63
65
|
|
|
64
|
-
本包不发布 runtime invariant companion:同一个 effect 拥有选择准入、review 登记、取消与清理,不存在能与这些自有操作相互偏离的独立观察。
|
|
65
|
-
|
|
66
66
|
</details>
|
|
67
67
|
|
|
68
68
|
-----
|
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.
|
|
4
|
+
"version": "0.2.1-alpha.2",
|
|
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.
|
|
34
|
-
"@deepseek-ai/dsh-
|
|
35
|
-
"@deepseek-ai/dsh-
|
|
36
|
-
"@deepseek-ai/dsh-
|
|
37
|
-
"@deepseek-ai/dsh-
|
|
38
|
-
"@deepseek-ai/dsh-tools": "0.2.
|
|
39
|
-
"@deepseek-ai/cordis": "~4.0.
|
|
33
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.2",
|
|
34
|
+
"@deepseek-ai/dsh-agent-instructions": "0.2.1-alpha.2",
|
|
35
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.2",
|
|
36
|
+
"@deepseek-ai/dsh-permission-presets": "0.2.1-alpha.2",
|
|
37
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.2",
|
|
38
|
+
"@deepseek-ai/dsh-tools": "0.2.1-alpha.2",
|
|
39
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.1",
|
|
40
|
+
"@deepseek-ai/dsh-working-directory": "0.2.1-alpha.2"
|
|
40
41
|
},
|
|
41
42
|
"dependencies": {
|
|
42
|
-
"@deepseek-ai/dsh-util-values": "0.2.
|
|
43
|
+
"@deepseek-ai/dsh-util-values": "0.2.1-alpha.2"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"@deepseek-ai/dsh-agent
|
|
46
|
-
"@deepseek-ai/dsh-agent-
|
|
47
|
-
"@deepseek-ai/dsh-
|
|
48
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.
|
|
49
|
-
"@deepseek-ai/dsh-
|
|
50
|
-
"@deepseek-ai/dsh-compaction": "0.2.
|
|
51
|
-
"@deepseek-ai/dsh-fs-local": "0.2.
|
|
52
|
-
"@deepseek-ai/dsh-fs-observation-policy": "0.2.
|
|
53
|
-
"@deepseek-ai/dsh-fs-sandbox": "0.2.
|
|
54
|
-
"@deepseek-ai/dsh-llm": "0.2.
|
|
55
|
-
"@deepseek-ai/dsh-llm-deepseek": "0.2.
|
|
56
|
-
"@deepseek-ai/dsh-llm-deepseek-api-key": "0.2.
|
|
57
|
-
"@deepseek-ai/dsh-permission-presets": "0.2.
|
|
58
|
-
"@deepseek-ai/dsh-ptc-runtime-node": "0.2.
|
|
59
|
-
"@deepseek-ai/dsh-sandbox": "0.2.
|
|
60
|
-
"@deepseek-ai/dsh-
|
|
61
|
-
"@deepseek-ai/dsh-
|
|
62
|
-
"@deepseek-ai/dsh-
|
|
63
|
-
"@deepseek-ai/dsh-
|
|
64
|
-
"@deepseek-ai/dsh-
|
|
65
|
-
"@deepseek-ai/dsh-
|
|
66
|
-
"@deepseek-ai/dsh-
|
|
67
|
-
"@deepseek-ai/dsh-
|
|
68
|
-
"@deepseek-ai/dsh-
|
|
69
|
-
"@deepseek-ai/
|
|
70
|
-
"@deepseek-ai/dsh-
|
|
71
|
-
"@deepseek-ai/dsh-
|
|
72
|
-
"@deepseek-ai/dsh-
|
|
73
|
-
"@deepseek-ai/
|
|
46
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.2",
|
|
47
|
+
"@deepseek-ai/dsh-agent-instructions": "0.2.1-alpha.2",
|
|
48
|
+
"@deepseek-ai/dsh-agent-loop": "0.2.1-alpha.2",
|
|
49
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-alpha.2",
|
|
50
|
+
"@deepseek-ai/dsh-bash-sandbox": "0.2.1-alpha.2",
|
|
51
|
+
"@deepseek-ai/dsh-compaction": "0.2.1-alpha.2",
|
|
52
|
+
"@deepseek-ai/dsh-fs-local": "0.2.1-alpha.2",
|
|
53
|
+
"@deepseek-ai/dsh-fs-observation-policy": "0.2.1-alpha.2",
|
|
54
|
+
"@deepseek-ai/dsh-fs-sandbox": "0.2.1-alpha.2",
|
|
55
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.2",
|
|
56
|
+
"@deepseek-ai/dsh-llm-deepseek": "0.2.1-alpha.2",
|
|
57
|
+
"@deepseek-ai/dsh-llm-deepseek-api-key": "0.2.1-alpha.2",
|
|
58
|
+
"@deepseek-ai/dsh-permission-presets": "0.2.1-alpha.2",
|
|
59
|
+
"@deepseek-ai/dsh-ptc-runtime-node": "0.2.1-alpha.2",
|
|
60
|
+
"@deepseek-ai/dsh-sandbox": "0.2.1-alpha.2",
|
|
61
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.2",
|
|
62
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.2",
|
|
63
|
+
"@deepseek-ai/dsh-session-projection": "0.2.1-alpha.2",
|
|
64
|
+
"@deepseek-ai/dsh-shell": "0.2.1-alpha.2",
|
|
65
|
+
"@deepseek-ai/dsh-shell-env": "0.2.1-alpha.2",
|
|
66
|
+
"@deepseek-ai/dsh-subagent": "0.2.1-alpha.2",
|
|
67
|
+
"@deepseek-ai/dsh-subprocess-local": "0.2.1-alpha.2",
|
|
68
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.2",
|
|
69
|
+
"@deepseek-ai/dsh-tool-bash": "0.2.1-alpha.2",
|
|
70
|
+
"@deepseek-ai/dsh-tool-fs": "0.2.1-alpha.2",
|
|
71
|
+
"@deepseek-ai/dsh-tool-subagent": "0.2.1-alpha.2",
|
|
72
|
+
"@deepseek-ai/dsh-tools": "0.2.1-alpha.2",
|
|
73
|
+
"@deepseek-ai/dsh-user-approval": "0.2.1-alpha.2",
|
|
74
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.1",
|
|
75
|
+
"@deepseek-ai/dsh-working-directory": "0.2.1-alpha.2"
|
|
74
76
|
},
|
|
75
77
|
"publishConfig": {
|
|
76
78
|
"access": "public"
|