dsh-perm-gate 5.4.4 → 5.5.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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 5.5.0 (2026-11-06)
6
+
7
+ - **`apply_patch` 默认自动放行(路径敏感)**:宿主 0.2.2 内建的 `apply_patch` 工具现在与 READ_TOOLS 同档处理——不弹框、不叫模型,但 P0 硬拒、凭据路径、规则层 deny/ask 仍全量生效。`extractPathCandidates` 新增 Codex patch 文本解析(`*** Add/Update/Delete File: path`、`*** Move to: path`),确保补丁目标路径可被规则匹配。
8
+ - **`autoAllowTools` 白名单工具设置卡暴露**:用户可在设置页添加自定义工具名(与 read/grep 同档完全放行),方便第三方插件注册的安全工具免于每次弹框。字段为 volatile string[],即时生效。
9
+ - **0.2.2-rc.1 宿主枚举**:engines.dsh + peers 追加 `0.2.2-rc.1`(宿主现 latest),双清单同步。
10
+
5
11
  ## 5.4.4 (2026-11-03)
6
12
 
7
13
  - **YOLO 工作区豁免开关 `yoloWorkspaceExempt`(默认关)**:`opaque` 拆成两类——`consequence`(执行内容看不见:编码载荷、正文读不到的脚本、prose)与 `location`(动作本身可见,只是落点判不清:无参数工具、工作区外未读到正文的脚本)。开关只在 `permissive-yolo` 一档上跳过 `location` 那一条,且要求目标全部落在 workspace 内、非删除/非远端写、非不可逆/不可沉淀;`consequence` 与 P0/凭据/`irreversible`/`neverClear` 一律不变。工作区边界的判定在运行时另走 `pathsRealInsideWorkspace`(`node:fs` realpath,Windows 折叠大小写),符号链接/目录联接指向外部、或路径无法解析时一律不放行;`ask-context` 仍保持无依赖的词法判定供浏览器半复用。无审查模型时被豁免调用直接放行,事件标 `yolo-allow-opaque-location-exempt(-no-reviewer)`,审计 reason 带 `[exempt:opaque-location]`,与「机械网没发现」可区分。其余四档行为零变化,关机即回到 5.4.3 行为。
package/README.ja.md CHANGED
@@ -63,7 +63,7 @@ fail-closed を徹底します:P0 の判定は、grant・ルール・分類器
63
63
  上書きされません。
64
64
 
65
65
  <!-- host-compat:begin — generated by scripts/sync-hosts.mjs from scripts/hosts.mjs; DO NOT EDIT -->
66
- - **対応する DSH ホスト:** `0.1.0-rc.2` `0.1.0-rc.3` `0.1.0-rc.6` `0.1.0-rc.7` `0.1.0-rc.8` `0.1.1-rc.1` `0.1.1-rc.2` `0.1.2-rc.1` `0.1.5-rc.1` `0.1.5-rc.2` `0.1.5-rc.3` `0.1.7-rc.1` `0.1.7-rc.2` `0.2.0-rc.1` `0.2.0-rc.2` `0.2.1-rc.1` `0.2.1-rc.2` `0.2.1-rc.3` `0.2.1-rc.4` `0.2.1-rc.5`(0.1.0 / 0.1.1 / 0.1.2 / 0.1.5 / 0.1.7 / 0.2.0 / 0.2.1 の 20 rc)
66
+ - **対応する DSH ホスト:** `0.1.0-rc.2` `0.1.0-rc.3` `0.1.0-rc.6` `0.1.0-rc.7` `0.1.0-rc.8` `0.1.1-rc.1` `0.1.1-rc.2` `0.1.2-rc.1` `0.1.5-rc.1` `0.1.5-rc.2` `0.1.5-rc.3` `0.1.7-rc.1` `0.1.7-rc.2` `0.2.0-rc.1` `0.2.0-rc.2` `0.2.1-rc.1` `0.2.1-rc.2` `0.2.1-rc.3` `0.2.1-rc.4` `0.2.1-rc.5` `0.2.2-rc.1`(0.1.0 / 0.1.1 / 0.1.2 / 0.1.5 / 0.1.7 / 0.2.0 / 0.2.1 の 21 rc)
67
67
  - **ランタイム検証済み:** `0.2.0-rc.2`(証跡は `.compat-results/`)
68
68
  <!-- host-compat:end -->
69
69
 
package/README.ko.md CHANGED
@@ -61,7 +61,7 @@ DeepSeek Harness용 단일·자족적·결정론 우선·fail-closed 권한 게
61
61
  덮어써지지 않습니다.
62
62
 
63
63
  <!-- host-compat:begin — generated by scripts/sync-hosts.mjs from scripts/hosts.mjs; DO NOT EDIT -->
64
- - **지원하는 DSH 호스트:** `0.1.0-rc.2` `0.1.0-rc.3` `0.1.0-rc.6` `0.1.0-rc.7` `0.1.0-rc.8` `0.1.1-rc.1` `0.1.1-rc.2` `0.1.2-rc.1` `0.1.5-rc.1` `0.1.5-rc.2` `0.1.5-rc.3` `0.1.7-rc.1` `0.1.7-rc.2` `0.2.0-rc.1` `0.2.0-rc.2` `0.2.1-rc.1` `0.2.1-rc.2` `0.2.1-rc.3` `0.2.1-rc.4` `0.2.1-rc.5` (0.1.0 / 0.1.1 / 0.1.2 / 0.1.5 / 0.1.7 / 0.2.0 / 0.2.1 라인의 20개 rc)
64
+ - **지원하는 DSH 호스트:** `0.1.0-rc.2` `0.1.0-rc.3` `0.1.0-rc.6` `0.1.0-rc.7` `0.1.0-rc.8` `0.1.1-rc.1` `0.1.1-rc.2` `0.1.2-rc.1` `0.1.5-rc.1` `0.1.5-rc.2` `0.1.5-rc.3` `0.1.7-rc.1` `0.1.7-rc.2` `0.2.0-rc.1` `0.2.0-rc.2` `0.2.1-rc.1` `0.2.1-rc.2` `0.2.1-rc.3` `0.2.1-rc.4` `0.2.1-rc.5` `0.2.2-rc.1` (0.1.0 / 0.1.1 / 0.1.2 / 0.1.5 / 0.1.7 / 0.2.0 / 0.2.1 라인의 21개 rc)
65
65
  - **런타임 검증됨:** `0.2.0-rc.2` (증적은 `.compat-results/`)
66
66
  <!-- host-compat:end -->
67
67
 
package/README.md CHANGED
@@ -59,7 +59,7 @@ A single, self-sufficient, deterministic-first, fail-closed permission gate for
59
59
  Strictly fail-closed: a P0 decision is never overridden by a grant, a rule, the classifier, or a human.
60
60
 
61
61
  <!-- host-compat:begin — generated by scripts/sync-hosts.mjs from scripts/hosts.mjs; DO NOT EDIT -->
62
- - **Supported DSH hosts:** `0.1.0-rc.2` `0.1.0-rc.3` `0.1.0-rc.6` `0.1.0-rc.7` `0.1.0-rc.8` `0.1.1-rc.1` `0.1.1-rc.2` `0.1.2-rc.1` `0.1.5-rc.1` `0.1.5-rc.2` `0.1.5-rc.3` `0.1.7-rc.1` `0.1.7-rc.2` `0.2.0-rc.1` `0.2.0-rc.2` `0.2.1-rc.1` `0.2.1-rc.2` `0.2.1-rc.3` `0.2.1-rc.4` `0.2.1-rc.5` (20 rc releases across lines 0.1.0 / 0.1.1 / 0.1.2 / 0.1.5 / 0.1.7 / 0.2.0 / 0.2.1)
62
+ - **Supported DSH hosts:** `0.1.0-rc.2` `0.1.0-rc.3` `0.1.0-rc.6` `0.1.0-rc.7` `0.1.0-rc.8` `0.1.1-rc.1` `0.1.1-rc.2` `0.1.2-rc.1` `0.1.5-rc.1` `0.1.5-rc.2` `0.1.5-rc.3` `0.1.7-rc.1` `0.1.7-rc.2` `0.2.0-rc.1` `0.2.0-rc.2` `0.2.1-rc.1` `0.2.1-rc.2` `0.2.1-rc.3` `0.2.1-rc.4` `0.2.1-rc.5` `0.2.2-rc.1` (21 rc releases across lines 0.1.0 / 0.1.1 / 0.1.2 / 0.1.5 / 0.1.7 / 0.2.0 / 0.2.1)
63
63
  - **Runtime-verified:** `0.2.0-rc.2` — evidence in `.compat-results/`
64
64
  <!-- host-compat:end -->
65
65
 
package/README.zh.md CHANGED
@@ -56,7 +56,7 @@
56
56
  严格 fail-closed:P0 永不因 grant / 规则 / 分类器 / 人工而放行。
57
57
 
58
58
  <!-- host-compat:begin — generated by scripts/sync-hosts.mjs from scripts/hosts.mjs; DO NOT EDIT -->
59
- - **支持的 DSH 宿主:** `0.1.0-rc.2` `0.1.0-rc.3` `0.1.0-rc.6` `0.1.0-rc.7` `0.1.0-rc.8` `0.1.1-rc.1` `0.1.1-rc.2` `0.1.2-rc.1` `0.1.5-rc.1` `0.1.5-rc.2` `0.1.5-rc.3` `0.1.7-rc.1` `0.1.7-rc.2` `0.2.0-rc.1` `0.2.0-rc.2` `0.2.1-rc.1` `0.2.1-rc.2` `0.2.1-rc.3` `0.2.1-rc.4` `0.2.1-rc.5`(覆盖 0.1.0 / 0.1.1 / 0.1.2 / 0.1.5 / 0.1.7 / 0.2.0 / 0.2.1 七条线共 20 个 rc)
59
+ - **支持的 DSH 宿主:** `0.1.0-rc.2` `0.1.0-rc.3` `0.1.0-rc.6` `0.1.0-rc.7` `0.1.0-rc.8` `0.1.1-rc.1` `0.1.1-rc.2` `0.1.2-rc.1` `0.1.5-rc.1` `0.1.5-rc.2` `0.1.5-rc.3` `0.1.7-rc.1` `0.1.7-rc.2` `0.2.0-rc.1` `0.2.0-rc.2` `0.2.1-rc.1` `0.2.1-rc.2` `0.2.1-rc.3` `0.2.1-rc.4` `0.2.1-rc.5` `0.2.2-rc.1`(覆盖 0.1.0 / 0.1.1 / 0.1.2 / 0.1.5 / 0.1.7 / 0.2.0 / 0.2.1 七条线共 21 个 rc)
60
60
  - **运行时已验证:** `0.2.0-rc.2`(证据见 `.compat-results/`)
61
61
  <!-- host-compat:end -->
62
62
 
package/dsh.plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "dsh-perm-gate",
3
3
  "name": "dsh-perm-gate",
4
- "version": "5.4.4",
4
+ "version": "5.5.1",
5
5
  "description": {
6
6
  "en": "Deterministic-first, fail-closed permission gate for DeepSeek Harness 0.1.2+: a P0 hard-deny -> P1 precise session grant -> P2 static allow/deny rule chain -> P3 optional LLM classifier -> P4 ask pipeline over the tools/pre-execute waterfall, with a standalone CLI dry-run evaluator and an auditable decision log. Credential handling is a seven-family ladder (ssh/cloud/package/gitcreds/env/cli/db) with deny/ask/readonly/readwrite rungs kept in the rules document plus a paired write-exemption list; a protected-branch push switch keeps the P0 floor by default. It only vetoes with deny/ask and always delegates otherwise, and unknown or malformed rules fail loud instead of silently standing the gate down.",
7
7
  "zh": "面向 DeepSeek Harness 0.1.2+ 的确定性优先、失败即拒的权限闸门:在 tools/pre-execute 瀑布上串起 P0 硬拒绝 → P1 精确会话授权 → P2 静态 allow/deny 规则链 → P3 可选 LLM 语义分类 → P4 ask,并附带独立 CLI 干跑评估器与可审计的决策日志。凭据处理为七族阶梯(ssh/cloud/package/gitcreds/env/cli/db)× deny/ask/readonly/readwrite 四档,档位存规则文档 + 成对写豁免清单;保护分支强推开关默认保留 P0 地板。只以 deny/ask 否决、其余一律放行,规则未知或非法时直接报错,绝不静默失效。"
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "license": "MIT",
15
15
  "engines": {
16
- "dsh": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5"
16
+ "dsh": ">=0.1.1-rc.2 <0.3.0"
17
17
  },
18
18
  "components": {
19
19
  "host": "lib/index.js",
package/lib/client.js CHANGED
@@ -58,6 +58,9 @@ window.__ModuleLoader__.load({
58
58
  "card.scriptReview": "脚本正文随审查一并送审(默认开)",
59
59
  "card.scriptReviewHint": "调用运行脚本文件时读取它的正文:审查模型与人看的是同一份代码,规则层也按正文判定不可逆(文件名看不出危险的删除正是这么漏掉的)。正文出境前脱敏并截断;关掉它就不会让文件内容离开本机,代价是工作区外的脚本回到「看不清」档位。",
60
60
  "card.credentialPaths": "自定义凭据路径(长尾)",
61
+ "card.autoAllowTools": "白名单工具(完全放行)",
62
+ "card.autoAllowToolsHint": "列表中的工具名与 read/grep 同档:弹框和模型审查跳过,但凭据路径硬拒和规则层 deny 仍生效。用于自定义插件注册的安全工具名。",
63
+ "card.autoAllowToolsPlaceholder": "工具名,如 my_safe_tool",
61
64
  "card.credentialPathsHint": "插件内置清单之外的机密文件。写法是路径 glob:双星跨目录、单星与问号只在一段内;不含通配符时按路径片段匹配(token 不会命中 ambient.txt);行首 ~/ 会展开为你的 home;相对写法也在任意深度匹配(secrets/*.env 覆盖 a/b/secrets/prod.env)。命中后与 .ssh 同档:工作区外读取被硬拒、被文件工具改写被硬拒(这一档不可申诉,也不会被审查模型放行),所以只写确实需要保护的路径。",
62
65
  "card.credentialPathsPlaceholder": "新路径,如 ~/.myco/vault.token 或 secrets/*.env",
63
66
  "card.denyKeywordsExtra": "追加黑名单关键词(不替换预置)",
@@ -262,6 +265,9 @@ window.__ModuleLoader__.load({
262
265
  "card.scriptReview": "Attach script bodies to the review (on by default)",
263
266
  "card.scriptReviewHint": "When a call runs a script file, its body is read and given to the risk model and the human alike, and the deterministic nets grade the body too (a delete that only shows up inside the file is exactly what used to slip through). Bodies are redacted and length-capped before leaving the host; switching this off keeps file contents local at the cost of sending out-of-workspace scripts back to the unreadable tier.",
264
267
  "card.credentialPaths": "Custom credential paths (the long tail)",
268
+ "card.autoAllowTools": "Auto-allow tools (bypass ask)",
269
+ "card.autoAllowToolsHint": "Tool names in this list are treated like read/grep: no popup, no model review. P0 hard-deny and path rules still fire. Use for safe tools registered by your own plugins.",
270
+ "card.autoAllowToolsPlaceholder": "Tool name, e.g. my_safe_tool",
265
271
  "card.credentialPathsHint": "Secret files the built-in list does not know. Entries are path globs: a double star crosses directories, a single star and a question mark stay inside one segment; without a wildcard it matches a whole path fragment (token will not hit ambient.txt); a leading ~/ expands to your home; a relative pattern also matches at any depth (secrets/*.env covers a/b/secrets/prod.env). A hit is held to the same standard as .ssh: reading it outside the workspace is hard-denied, mutating it with a file tool is hard-denied — that tier cannot be appealed or talked past by the reviewer, so declare only paths you truly need protected.",
266
272
  "card.credentialPathsPlaceholder": "New path, e.g. ~/.myco/vault.token or secrets/*.env",
267
273
  "card.denyKeywordsExtra": "Appended blacklist keywords (never replaces the preset)",
@@ -2655,7 +2661,8 @@ window.__ModuleLoader__.load({
2655
2661
  denyKeywordsExtra: listOf(raw.denyKeywordsExtra),
2656
2662
  credentialPaths: listOf(raw.credentialPaths),
2657
2663
  extraContentArgKeys: listOf(raw.extraContentArgKeys),
2658
- extraOperationArgKeys: listOf(raw.extraOperationArgKeys)
2664
+ extraOperationArgKeys: listOf(raw.extraOperationArgKeys),
2665
+ autoAllowTools: listOf(raw.autoAllowTools)
2659
2666
  };
2660
2667
  const strategies = value.permissiveStrategies ?? {};
2661
2668
  const hasApiKey = typeof value.classifierApiKey === "string" && value.classifierApiKey !== "";
@@ -3918,6 +3925,24 @@ window.__ModuleLoader__.load({
3918
3925
  })] }) : null
3919
3926
  ]
3920
3927
  }),
3928
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", {
3929
+ style: sectionStyle,
3930
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StringListField, {
3931
+ label: t("card.autoAllowTools"),
3932
+ hint: t("card.autoAllowToolsHint"),
3933
+ placeholder: t("card.autoAllowToolsPlaceholder"),
3934
+ addLabel: t("card.denylistAdd"),
3935
+ removeLabel: t("card.listRemove"),
3936
+ items: value.autoAllowTools ?? [],
3937
+ locked: readonly,
3938
+ onAdd: (entry) => {
3939
+ scope.set("autoAllowTools", [...value.autoAllowTools ?? [], entry]);
3940
+ },
3941
+ onRemove: (index) => {
3942
+ scope.set("autoAllowTools", (value.autoAllowTools ?? []).filter((_, i) => i !== index));
3943
+ }
3944
+ })
3945
+ }),
3921
3946
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
3922
3947
  style: sectionStyle,
3923
3948
  children: [