@lmzhen/dsh-evolution-threat 0.3.50 → 0.3.52
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/lib/index.js +5 -7
- package/package.json +4 -4
package/lib/index.js
CHANGED
|
@@ -55,13 +55,11 @@ function apply(ctx, rawConfig = {}) {
|
|
|
55
55
|
if (!(rawConfig.enabled ?? true)) return;
|
|
56
56
|
const maxScanChars = resolveMaxScanChars(rawConfig);
|
|
57
57
|
if (maxScanChars !== (rawConfig.maxScanChars ?? 65536)) ctx.logger.warn(`evolution-threat: maxScanChars=${String(rawConfig.maxScanChars)} is invalid; falling back to the default 65_536`);
|
|
58
|
-
ctx.
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
};
|
|
64
|
-
return next();
|
|
58
|
+
ctx.inject(["tools"], (toolCtx) => {
|
|
59
|
+
const tools = toolCtx.get("tools");
|
|
60
|
+
toolCtx.effect(() => tools.guard((exec) => {
|
|
61
|
+
return scanToolArgs(exec.name, exec.arguments, maxScanChars) ?? void 0;
|
|
62
|
+
}), "evolution-threat.tools-guard");
|
|
65
63
|
});
|
|
66
64
|
}
|
|
67
65
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-threat",
|
|
3
3
|
"description": "Write-time threat guard for evolution tools (community build)",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.52",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "git+https://github.com/lmzhen/dsh-evolution.git",
|
|
11
|
-
"directory": "packages/
|
|
11
|
+
"directory": "packages/evolution-threat"
|
|
12
12
|
},
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "lib/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
34
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
34
|
+
"@lmzhen/dsh-evolution-core": "^0.3.52"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
@@ -42,6 +42,6 @@
|
|
|
42
42
|
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.1-rc.2",
|
|
43
43
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
44
44
|
"@deepseek-ai/dsh-tools": "^0.1.1-rc.2",
|
|
45
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
45
|
+
"@lmzhen/dsh-evolution-core": "^0.3.52"
|
|
46
46
|
}
|
|
47
47
|
}
|