@lytharalab/dsh-cons-auto-review 1.2.1 → 1.2.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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 1.2.2
2
+
3
+ - 适配 DSH **0.2.1-rc.5**,保留 **0.1.7-rc.2**、**0.2.0-rc.2** 与 **0.2.1-rc.2** 支持;测试依赖升级,CI 扩展为 Node.js 22 / 24 × 四个 DSH 版本。
4
+ - 核对新版发布包后,现有审查逻辑可继续复用;无需修改宿主或用户权限配置。
5
+ - 新增真实模型服务回归:能力变化后只选择当前明确提供的低推理档位;安全写入不查询模型,能力查询失败转中文审批且不执行工具。
6
+
1
7
  # 1.2.1
2
8
 
3
9
  - 适配 DSH **0.2.1-rc.2**,保留 **0.1.7-rc.2** 与 **0.2.0-rc.2** 支持;测试依赖升级,CI 扩展为 Node.js 22 / 24 × 三个 DSH 版本。
package/README.md CHANGED
@@ -1,16 +1,16 @@
1
- # Con's 自动审查 — DCAR 1.2.1
1
+ # Con's 自动审查 — DCAR 1.2.2
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@lytharalab/dsh-cons-auto-review.svg)](https://www.npmjs.com/package/@lytharalab/dsh-cons-auto-review)
4
4
  [![CI](https://github.com/LytharaLab/DSH-Cons-Auto-Review/actions/workflows/ci.yml/badge.svg)](https://github.com/LytharaLab/DSH-Cons-Auto-Review/actions/workflows/ci.yml)
5
5
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
6
 
7
- > **English.** DCAR (`@lytharalab/dsh-cons-auto-review`) adds a **CAutoR** preset to the DeepSeek Harness permission menu. Deterministic rules approve safe operations first — workspace writes, declared temp/external roots, literal read-only shell commands — and only what a program cannot approve is escalated to the LLM auto-review. The deterministic layer returns `allow` or `escalate`, never a silent denial. Install with `dsh plugin --profile desktop add @lytharalab/dsh-cons-auto-review`; Node.js 22.19+ or 24+, tested against DSH `0.1.7-rc.2`, `0.2.0-rc.2` and `0.2.1-rc.2`. The detailed documentation below is in Chinese.
7
+ > **English.** DCAR (`@lytharalab/dsh-cons-auto-review`) adds a **CAutoR** preset to the DeepSeek Harness permission menu. Deterministic rules approve safe operations first — workspace writes, declared temp/external roots, literal read-only shell commands — and only what a program cannot approve is escalated to the LLM auto-review. The deterministic layer returns `allow` or `escalate`, never a silent denial. Install with `dsh plugin --profile desktop add @lytharalab/dsh-cons-auto-review`; Node.js 22.19+ or 24+, tested against DSH `0.1.7-rc.2`, `0.2.0-rc.2`, `0.2.1-rc.2` and `0.2.1-rc.5`. The detailed documentation below is in Chinese.
8
8
 
9
9
  **`@lytharalab/dsh-cons-auto-review`** 为 DeepSeek Harness 的「权限」菜单添加 **CAutoR** 模式:先用 DSH「工作区内修改」的确定性路径规则自动放行安全操作,仅将无法由程序自动批准的操作交给 LLM Auto Review。第一层只返回 `allow` 或 `escalate`。
10
10
 
11
11
  ## 安装与启用
12
12
 
13
- 包已发布到 npm:[`@lytharalab/dsh-cons-auto-review`](https://www.npmjs.com/package/@lytharalab/dsh-cons-auto-review)。要求 Node.js 22.19+ 或 24+;兼容并测试 DSH **0.1.7-rc.2**、**0.2.0-rc.2**、**0.2.1-rc.2**。DSH 的插件 API 仍在变化,其他版本不作为 1.2.1 的兼容承诺。
13
+ 包已发布到 npm:[`@lytharalab/dsh-cons-auto-review`](https://www.npmjs.com/package/@lytharalab/dsh-cons-auto-review)。要求 Node.js 22.19+ 或 24+;兼容并测试 DSH **0.1.7-rc.2**、**0.2.0-rc.2**、**0.2.1-rc.2**、**0.2.1-rc.5**。DSH 的插件 API 仍在变化,其他版本不作为 1.2.2 的兼容承诺。
14
14
 
15
15
  ```powershell
16
16
  dsh plugin --profile desktop add @lytharalab/dsh-cons-auto-review
@@ -20,7 +20,7 @@ Web 使用 `--profile web`。也可以离线安装解压的项目目录或仓库
20
20
 
21
21
  ```powershell
22
22
  dsh plugin --profile desktop add "L:\Projects\DSH-Cons-Auto-Review"
23
- dsh plugin --profile desktop add "L:\Projects\DSH-Cons-Auto-Review\lytharalab-dsh-cons-auto-review-1.2.1.tgz"
23
+ dsh plugin --profile desktop add "L:\Projects\DSH-Cons-Auto-Review\lytharalab-dsh-cons-auto-review-1.2.2.tgz"
24
24
  ```
25
25
 
26
26
  **从旧包名升级:**包在首次公开发布时由 `dsh-cons-auto-review` 改名为 `@lytharalab/dsh-cons-auto-review`。关闭 Desktop,先移除旧包再装新包,然后重新打开:
@@ -66,6 +66,10 @@ profile 配置里若残留 `name: dsh-cons-auto-review` 的插件行或覆盖片
66
66
 
67
67
  CAutoR 的执行策略是 `danger-full-access`。它复用原模式的路径审查逻辑,并以程序检查及 LLM 作为授权入口;不使用原执行沙箱隔离进程。
68
68
 
69
+ ## 1.2.2 · DSH 0.2.1-rc.5 适配
70
+
71
+ 支持 DSH **0.2.1-rc.5**,保留此前三个版本的兼容性。测试依赖使用新版真实服务,CI 覆盖 Node.js 22 / 24 × 四个 DSH 版本;新增模型能力动态变化及能力查询失败的真实服务回归验证。
72
+
69
73
  ## 1.2.1 · DSH 0.2.1 适配
70
74
 
71
75
  支持 DSH **0.2.1-rc.2** 的会话工作目录切换:相对文件路径、搜索路径、Shell 的 `workdir` 和审查输入均使用宿主当前目录。自动放行的工作区边界仍是会话初始工作区,切换目录不会扩大它;配置中的相对额外根目录与审计日志路径也仍以初始工作区为基准。当前目录消失时跟随宿主恢复;无法确定目录时按 `review.onError` 处理。旧 DSH 继续使用原有目录逻辑。
@@ -2,17 +2,19 @@
2
2
 
3
3
  ## 支持版本
4
4
 
5
- DCAR 1.2.1 固定支持 DSH **0.1.7-rc.2**、**0.2.0-rc.2** 与 **0.2.1-rc.2**。关键路径使用官方扩展点 `tools/pre-execute`、权限 Session 投影、命令注册表、文件系统解析和 `ctx.llm.stream`。
5
+ DCAR 1.2.2 固定支持 DSH **0.1.7-rc.2**、**0.2.0-rc.2**、**0.2.1-rc.2** 与 **0.2.1-rc.5**。关键路径使用官方扩展点 `tools/pre-execute`、权限 Session 投影、命令注册表、文件系统解析和 `ctx.llm.stream`。
6
6
 
7
7
  源码基线:DeepSeek Harness `639ed015397290b3745d163aafe02ffee4aa3f84`(`dsh-v0.2.0-rc.2`);旧版本基线为 `477b4f420553e8a52c2fbccc464d7561b239c443`(`dsh-v0.1.7-rc.2`)。两版使用的 reviewer、permission service、containment 与文件路径解析源码一致。
8
8
 
9
9
  新增基线:[DeepSeek Harness `687f282e8625c6b8d11ff58211a90524be2e4317`](https://github.com/deepseek-ai/deepseek-harness/tree/687f282e8625c6b8d11ff58211a90524be2e4317)(`dsh-v0.2.1-rc.2`)。新版将当前执行目录与原始工作区分开;DCAR 按宿主当前目录检查相对路径并构造审查环境,保留原工作区作为程序批准边界。当前目录变化通知只作为历史事实,不构成授权。旧版通过能力探测沿用初始目录,无需安装新版目录服务。
10
10
 
11
+ 新增基线:[DeepSeek Harness `b830ec950faba0a46dda564be3e2d854afed94f1`](https://github.com/deepseek-ai/deepseek-harness/tree/b830ec950faba0a46dda564be3e2d854afed94f1)(`dsh-v0.2.1-rc.5`)。已核对 GitHub 标签、版本间提交及新版权限服务源码,并比较 rc.2 / rc.5 对应测试依赖发布包:19 个直接 DSH 依赖的 `lib/` 运行时代码与类型声明(不含 source map)逐字节一致,当前适配逻辑可直接复用。新增真实服务测试验证动态模型能力与查询失败路径;这不替代真实远端模型目录及网络的验收。
12
+
11
13
  ## CAutoR 集成方式
12
14
 
13
15
  官方权限服务只提供固定 `registerAuto()` 动态接口,通用自定义模式依赖静态预设表。1.0.2 由主插件在激活时给已存在的权限服务实例附加动态模式注册能力;安装补丁只插入 `dcar`,不替换宿主的权限服务行。
14
16
 
15
- 运行时适配覆盖该服务实例的 `names/specOf/derive/apply`,复用原始 Session 事件、沙箱和审批 setter、`/permission`、Remote `catalog()`、投影及官方 Auto 注册。审查入口安装后注册 CAutoR;停用时取消审查、回退已加载会话,再撤销审查注册并还原服务原始属性;已保存的默认设置保留只读守护项。它需要官方类中 `specOf/derive/apply/emitCatalogChanged` 的运行时方法;这些不是通用稳定第三方扩展接口,因此依赖版本明确固定为以上三个版本,并在加载时检查方法可用性。插件不修改 DSH 安装目录中的源码,也不注册第二个权限服务。
17
+ 运行时适配覆盖该服务实例的 `names/specOf/derive/apply`,复用原始 Session 事件、沙箱和审批 setter、`/permission`、Remote `catalog()`、投影及官方 Auto 注册。审查入口安装后注册 CAutoR;停用时取消审查、回退已加载会话,再撤销审查注册并还原服务原始属性;已保存的默认设置保留只读守护项。它需要官方类中 `specOf/derive/apply/emitCatalogChanged` 的运行时方法;这些不是通用稳定第三方扩展接口,因此依赖版本明确固定为以上四个版本,并在加载时检查方法可用性。插件不修改 DSH 安装目录中的源码,也不注册第二个权限服务。
16
18
 
17
19
  DSH Web/desktop 的权限 UI 从该 `catalog()` 读取选项,自定义标签按服务端 `name` 显示,CAutoR 无需修改前端 bundle。
18
20
 
@@ -26,7 +28,7 @@ DSH Web/desktop 的权限 UI 从该 `catalog()` 读取选项,自定义标签
26
28
 
27
29
  ## 已运行的检查
28
30
 
29
- 见 `TEST_REPORT.md` 与 `test-results/`:三个发布版本分别安装对应的真实 DSH npm 包,运行完整插件测试;旧版显式跳过新版独有的目录服务场景。测试使用真实 Cordis、权限目录、Session、Session 投影、工具执行管线、原生文件读写工具、原生审批和命令服务;模型响应由本地测试 Adapter 提供。
31
+ 见 `TEST_REPORT.md` 与 `test-results/`:四个发布版本分别安装对应的真实 DSH npm 包,运行完整插件测试;旧版显式跳过新版独有的目录服务场景。测试使用真实 Cordis、权限目录、Session、Session 投影、工具执行管线、原生文件读写工具、原生审批和命令服务;模型响应由本地测试 Adapter 提供。
30
32
 
31
33
  覆盖本地零模型写入、按需升级、拒绝不执行、询问只在批准后执行、符号链接和目录前缀、Shell 混合语法、PTC 内部调用、子 Agent 与创建竞态、卸载回退、缺失审查提供者、配置验证、模型路由、重试、超时、并发、缓存和默认日志参数省略。
32
34
 
@@ -36,7 +38,7 @@ DSH Web/desktop 的权限 UI 从该 `catalog()` 读取选项,自定义标签
36
38
 
37
39
  ## 验证范围
38
40
 
39
- 1.2.1 验证环境为 Windows、Node.js 24.13.0;历史验证环境为 Linux、Node.js 24.19.0。未实际运行 Desktop 窗口、真实模型 API 或 OS 级沙箱进程。这里的 PTC 检查使用真实工具管线的 nested dispatch 输入,未启动 PTC VM。Node.js 22 / 24 的 Linux CI 矩阵仍需推送后运行。
41
+ 1.2.2 与 1.2.1 验证环境为 Windows、Node.js 24.13.0;历史验证环境为 Linux、Node.js 24.19.0。未实际运行 Desktop 窗口、真实模型 API 或 OS 级沙箱进程。这里的 PTC 检查使用真实工具管线的 nested dispatch 输入,未启动 PTC VM。Node.js 22 / 24 的 Linux CI 矩阵仍需推送后运行。
40
42
 
41
43
  默认设置测试使用真实 Settings、Loader 和权限服务,并将配置保存到测试 JSON 文件后重新加载。测试存储替代 DSH 的完整多层 YAML 配置编辑器;未启动实际 Desktop 设置页面。
42
44
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lytharalab/dsh-cons-auto-review",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Con's 自动审查(DCAR):确定性规则优先、LLM 按需升级的 DeepSeek Harness 工具审查插件,提供 CAutoR 权限模式。Deterministic-first auto review for DeepSeek Harness.",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -68,35 +68,35 @@
68
68
  },
69
69
  "peerDependencies": {
70
70
  "@deepseek-ai/cordis": "^4.0.0",
71
- "@deepseek-ai/dsh-llm": "0.1.7-rc.2 || 0.2.0-rc.2 || 0.2.1-rc.2",
72
- "@deepseek-ai/dsh-permission-presets": "0.1.7-rc.2 || 0.2.0-rc.2 || 0.2.1-rc.2",
73
- "@deepseek-ai/dsh-sandbox": "0.1.7-rc.2 || 0.2.0-rc.2 || 0.2.1-rc.2",
74
- "@deepseek-ai/dsh-util-values": "0.1.7-rc.2 || 0.2.0-rc.2 || 0.2.1-rc.2",
71
+ "@deepseek-ai/dsh-llm": "0.1.7-rc.2 || 0.2.0-rc.2 || 0.2.1-rc.2 || 0.2.1-rc.5",
72
+ "@deepseek-ai/dsh-permission-presets": "0.1.7-rc.2 || 0.2.0-rc.2 || 0.2.1-rc.2 || 0.2.1-rc.5",
73
+ "@deepseek-ai/dsh-sandbox": "0.1.7-rc.2 || 0.2.0-rc.2 || 0.2.1-rc.2 || 0.2.1-rc.5",
74
+ "@deepseek-ai/dsh-util-values": "0.1.7-rc.2 || 0.2.0-rc.2 || 0.2.1-rc.2 || 0.2.1-rc.5",
75
75
  "@deepseek-ai/schemastery": "*",
76
- "@deepseek-ai/dsh-user-approval": "0.1.7-rc.2 || 0.2.0-rc.2 || 0.2.1-rc.2"
76
+ "@deepseek-ai/dsh-user-approval": "0.1.7-rc.2 || 0.2.0-rc.2 || 0.2.1-rc.2 || 0.2.1-rc.5"
77
77
  },
78
78
  "devDependencies": {
79
79
  "@deepseek-ai/cordis": "4.0.4",
80
80
  "@deepseek-ai/cordis-plugin-loader": "1.0.5",
81
- "@deepseek-ai/dsh-attachment": "0.2.1-rc.2",
82
- "@deepseek-ai/dsh-commands": "0.2.1-rc.2",
83
- "@deepseek-ai/dsh-fs": "0.2.1-rc.2",
84
- "@deepseek-ai/dsh-fs-local": "0.2.1-rc.2",
85
- "@deepseek-ai/dsh-llm": "0.2.1-rc.2",
86
- "@deepseek-ai/dsh-permission-presets": "0.2.1-rc.2",
87
- "@deepseek-ai/dsh-sandbox": "0.2.1-rc.2",
88
- "@deepseek-ai/dsh-sandbox-policy": "0.2.1-rc.2",
89
- "@deepseek-ai/dsh-scope": "0.2.1-rc.2",
90
- "@deepseek-ai/dsh-session": "0.2.1-rc.2",
91
- "@deepseek-ai/dsh-session-projection": "0.2.1-rc.2",
92
- "@deepseek-ai/dsh-settings": "0.2.1-rc.2",
93
- "@deepseek-ai/dsh-shell": "0.2.1-rc.2",
94
- "@deepseek-ai/dsh-system-prompt": "0.2.1-rc.2",
95
- "@deepseek-ai/dsh-tool-fs": "0.2.1-rc.2",
96
- "@deepseek-ai/dsh-tools": "0.2.1-rc.2",
97
- "@deepseek-ai/dsh-user-approval": "0.2.1-rc.2",
98
- "@deepseek-ai/dsh-util-values": "0.2.1-rc.2",
99
- "@deepseek-ai/dsh-working-directory": "0.2.1-rc.2",
81
+ "@deepseek-ai/dsh-attachment": "0.2.1-rc.5",
82
+ "@deepseek-ai/dsh-commands": "0.2.1-rc.5",
83
+ "@deepseek-ai/dsh-fs": "0.2.1-rc.5",
84
+ "@deepseek-ai/dsh-fs-local": "0.2.1-rc.5",
85
+ "@deepseek-ai/dsh-llm": "0.2.1-rc.5",
86
+ "@deepseek-ai/dsh-permission-presets": "0.2.1-rc.5",
87
+ "@deepseek-ai/dsh-sandbox": "0.2.1-rc.5",
88
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.1-rc.5",
89
+ "@deepseek-ai/dsh-scope": "0.2.1-rc.5",
90
+ "@deepseek-ai/dsh-session": "0.2.1-rc.5",
91
+ "@deepseek-ai/dsh-session-projection": "0.2.1-rc.5",
92
+ "@deepseek-ai/dsh-settings": "0.2.1-rc.5",
93
+ "@deepseek-ai/dsh-shell": "0.2.1-rc.5",
94
+ "@deepseek-ai/dsh-system-prompt": "0.2.1-rc.5",
95
+ "@deepseek-ai/dsh-tool-fs": "0.2.1-rc.5",
96
+ "@deepseek-ai/dsh-tools": "0.2.1-rc.5",
97
+ "@deepseek-ai/dsh-user-approval": "0.2.1-rc.5",
98
+ "@deepseek-ai/dsh-util-values": "0.2.1-rc.5",
99
+ "@deepseek-ai/dsh-working-directory": "0.2.1-rc.5",
100
100
  "@deepseek-ai/schemastery": "3.18.4",
101
101
  "yaml": "2.8.3"
102
102
  },