dsh-perm-gate 5.7.1 → 5.7.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/CHANGELOG.md +10 -0
- package/THIRD_PARTY_NOTICES.md +44 -44
- package/dsh.plugin.json +1 -1
- package/lib/client.js +1572 -1340
- package/lib/client.js.map +1 -1
- package/lib/preset-rules.js +308 -308
- package/locale/de.json +1 -1
- package/locale/en.json +1 -1
- package/locale/es.json +1 -1
- package/locale/fr.json +1 -1
- package/locale/it.json +1 -1
- package/locale/ja.json +1 -1
- package/locale/ko.json +1 -1
- package/locale/pt.json +1 -1
- package/locale/ru.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.7.3 (2026-11-26)
|
|
4
|
+
|
|
5
|
+
**设置卡底栏 Star 快车道:★ 直接打开仓库页(不再只静默收起),隐藏独立成 ×。**
|
|
6
|
+
|
|
7
|
+
- 新增 `src/client/star-row-copy.ts`(由 `_tools/star-row/sync.mjs` 从 kit 真源生成,禁手改):GitHub 图标 + owner/repo 链接 | 求星话术 | ★ CTA | × 隐藏。
|
|
8
|
+
- **修 S 档旧缺陷**:点 ★ 此前写成 `starDismiss()`,与「别打扰我」合流,仓库页一次都没打开过。现在 ★ 走锚点 click 打开 `REPO_URL`(不写 dismissed),× 才写 `dsh.star.<ns>.dismissed=1` 并收话术与两钮;链接段永留。
|
|
9
|
+
- 真源 `STAR:EXTENDED` 段单源维护,A/L 档副本由 sync 整段剥除,已发布 A/L 仓零 diff。
|
|
10
|
+
- 文案 10 语按 `documentElement.lang` 前缀自选,不依赖宿主 locale 服务;样式只走 `--dsw-alias-*` 令牌与 `currentColor`,零硬色。
|
|
11
|
+
- 契约测试改写:旧断言「点 ★ 只收话术」本身把缺陷锁成了契约,改为「★ 打开仓库页且不写 dismissed / × 才隐藏」。
|
|
12
|
+
|
|
3
13
|
## 5.7.1 (2026-11-25)
|
|
4
14
|
|
|
5
15
|
- **引导新增第 4 步「评审模型建议挂本地端点」(zh + en)**:把「llmAssist 受信 LLM」的来源指向自定义 OpenAI 兼容端点(本地服务 + 小模型)。停在「使用会话当前默认模型」时,评审与被评审的对话跑在同一个 provider/model 上,每次工具调用都要再走一遍主模型——那是本插件最容易吃穿配额的一处。前 3 步正文逐字未动;术语取 `locales.ts` 既有译名,无新增展示文案键。
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
# Third-Party Notices
|
|
2
|
-
|
|
3
|
-
## cc-safety-net — source of the default deny/ask rule table
|
|
4
|
-
|
|
5
|
-
The preset rule catalog in `src/preset-rules.ts` (`PRESET_RULES_YAML`, the
|
|
6
|
-
`[deny-rule:*]` entries seeded into the live rules document on first
|
|
7
|
-
activation) is a port of the rule catalog from **cc-safety-net**:
|
|
8
|
-
|
|
9
|
-
- Project: <https://github.com/kenryu42/cc-safety-net>
|
|
10
|
-
- Files ported: `src/core/rules/destructive.ts` and `src/core/rules/secret.ts`
|
|
11
|
-
- Form of the port: the rules were **re-expressed** in this plugin's own
|
|
12
|
-
`permissions` YAML vocabulary (`command` / `argv` / `tools` dimensions, see
|
|
13
|
-
`src/rule.ts`); pattern shapes, tiering and verdicts were re-decided for this
|
|
14
|
-
gate's fail-toward-`ask` philosophy rather than copied verbatim.
|
|
15
|
-
- Deviations and coverage gaps are recorded in
|
|
16
|
-
`.agents/plans/compat-cc-safety-net-deny-table/rewrite-target.md`.
|
|
17
|
-
|
|
18
|
-
cc-safety-net is distributed under the MIT License, reproduced in full below;
|
|
19
|
-
its copyright notice is retained here and in the header of
|
|
20
|
-
`src/preset-rules.ts`.
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
MIT License
|
|
24
|
-
|
|
25
|
-
Copyright (c) 2026 J Liew
|
|
26
|
-
|
|
27
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
28
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
29
|
-
in the Software without restriction, including without limitation the rights
|
|
30
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
31
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
32
|
-
furnished to do so, subject to the following conditions:
|
|
33
|
-
|
|
34
|
-
The above copyright notice and this permission notice shall be included in all
|
|
35
|
-
copies or substantial portions of the Software.
|
|
36
|
-
|
|
37
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
38
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
39
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
40
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
41
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
42
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
43
|
-
SOFTWARE.
|
|
44
|
-
```
|
|
1
|
+
# Third-Party Notices
|
|
2
|
+
|
|
3
|
+
## cc-safety-net — source of the default deny/ask rule table
|
|
4
|
+
|
|
5
|
+
The preset rule catalog in `src/preset-rules.ts` (`PRESET_RULES_YAML`, the
|
|
6
|
+
`[deny-rule:*]` entries seeded into the live rules document on first
|
|
7
|
+
activation) is a port of the rule catalog from **cc-safety-net**:
|
|
8
|
+
|
|
9
|
+
- Project: <https://github.com/kenryu42/cc-safety-net>
|
|
10
|
+
- Files ported: `src/core/rules/destructive.ts` and `src/core/rules/secret.ts`
|
|
11
|
+
- Form of the port: the rules were **re-expressed** in this plugin's own
|
|
12
|
+
`permissions` YAML vocabulary (`command` / `argv` / `tools` dimensions, see
|
|
13
|
+
`src/rule.ts`); pattern shapes, tiering and verdicts were re-decided for this
|
|
14
|
+
gate's fail-toward-`ask` philosophy rather than copied verbatim.
|
|
15
|
+
- Deviations and coverage gaps are recorded in
|
|
16
|
+
`.agents/plans/compat-cc-safety-net-deny-table/rewrite-target.md`.
|
|
17
|
+
|
|
18
|
+
cc-safety-net is distributed under the MIT License, reproduced in full below;
|
|
19
|
+
its copyright notice is retained here and in the header of
|
|
20
|
+
`src/preset-rules.ts`.
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
MIT License
|
|
24
|
+
|
|
25
|
+
Copyright (c) 2026 J Liew
|
|
26
|
+
|
|
27
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
28
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
29
|
+
in the Software without restriction, including without limitation the rights
|
|
30
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
31
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
32
|
+
furnished to do so, subject to the following conditions:
|
|
33
|
+
|
|
34
|
+
The above copyright notice and this permission notice shall be included in all
|
|
35
|
+
copies or substantial portions of the Software.
|
|
36
|
+
|
|
37
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
38
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
39
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
40
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
41
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
42
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
43
|
+
SOFTWARE.
|
|
44
|
+
```
|
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
|
+
"version": "5.7.3",
|
|
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 否决、其余一律放行,规则未知或非法时直接报错,绝不静默失效。",
|