@shgroup/dsh-serenity-hooks 1.18.4 → 1.18.5
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/dsh.plugin.json +1 -1
- package/lib/index.js +12 -10
- package/package.json +1 -1
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-serenity-hooks",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.5",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"description": "宁静号 ACC harness(Native Cordis 插件):真实 DSH 工具 cc_fs/session/acc_msm/eap/neat/cce/loop + 拦截缝机械约束(safe-mode/路径守卫/会话落盘)。适配 DSH 公开版(0.1.0-rc,deepseek-ai/deepseek-harness)。私有(dsh-external 组织)。",
|
|
6
6
|
"engines": {
|
package/lib/index.js
CHANGED
|
@@ -1924,16 +1924,18 @@ function decideGuard(input) {
|
|
|
1924
1924
|
deny: `path escape blocked: "${pathArg}" 越出 CCC 根`,
|
|
1925
1925
|
kind: "deny"
|
|
1926
1926
|
};
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1927
|
+
if (toolName === "write" || toolName === "edit" || toolName === "str_replace_editor" || toolName === "cc_fs" || toolName === "bash" || toolName === "append" || toolName === "touch") {
|
|
1928
|
+
const rel = relative(root, abs).split("\\").join("/");
|
|
1929
|
+
if (rel === ".serenity-safe-on" || rel === ".serenity" || rel.startsWith(".serenity-safe-on/") || rel.startsWith(".serenity/")) return {
|
|
1930
|
+
deny: `CCC 治理文件 "${rel}" 保留给用户,agent 不可写`,
|
|
1931
|
+
kind: "deny"
|
|
1932
|
+
};
|
|
1933
|
+
const hit = matchBlacklist(rel, blacklist);
|
|
1934
|
+
if (hit) return {
|
|
1935
|
+
deny: hit.message ?? `blacklist blocked: "${pathArg}" 命中规则 "${hit.pattern}"`,
|
|
1936
|
+
kind: "deny"
|
|
1937
|
+
};
|
|
1938
|
+
}
|
|
1937
1939
|
}
|
|
1938
1940
|
return { kind: "allow" };
|
|
1939
1941
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shgroup/dsh-serenity-hooks",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.5",
|
|
4
4
|
"description": "宁静号 ACC harness — Native Cordis 插件(DeepSeek Harness 运行时)。真实 DSH 工具注册(cc_fs/session/acc_msm 等 9 工具)+ 拦截缝机械约束(safe-mode/路径守卫/会话落盘)+ 系统提示词注入(ACC/CCE/Constraints/SKILL/Session 五块)。适配 DSH 公开版(deepseek-ai/deepseek-harness 0.1.0-rc)。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|