dsh-rule-engine 0.4.2 → 0.4.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.
@@ -73,7 +73,9 @@ export function operationOf(toolName, args) {
73
73
  const cp = extractCopyPaths(text);
74
74
  if (cp && cp.source) pathPrefixes.push(normalizePath(cp.source));
75
75
  pathPrefixes = [...new Set(pathPrefixes.filter(Boolean))];
76
- pathPrefix = pathPrefixes.sort((a, b) => b.length - a.length)[0] || inferPathPrefixFromText(text);
76
+ // P0-1d:主写目标优先取真实写参数(Copy-Item Destination 等),
77
+ // 避免"源路径比目标长"时最长路径误选源(13A 误拦);授权匹配仍走多候选 pathPrefixes
78
+ pathPrefix = writeTargets[0] || pathPrefixes.sort((a, b) => b.length - a.length)[0] || inferPathPrefixFromText(text);
77
79
  } else if (name === "skill") {
78
80
  type = "skill";
79
81
  pathPrefix = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-rule-engine",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "DSH 规则执行引擎 v3:容器解析 AGENTS.md + 理解器 + 匹配机 + 执行框架",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",