@guanlin4924/devflow-pi 0.1.48 → 0.1.49
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/package.json
CHANGED
|
@@ -974,7 +974,10 @@ export function isShellControlMutation(toolName: string, input: unknown): boolea
|
|
|
974
974
|
command,
|
|
975
975
|
);
|
|
976
976
|
const namesControlPath = [...CONTROL_PATHS, ...CONTROL_PREFIXES].some(item => command.includes(item)) || /\.planning\/requirements\//.test(command);
|
|
977
|
-
|
|
977
|
+
// `2>` and `2>>` only redirect stderr. They frequently accompany read-only
|
|
978
|
+
// probes of control-plane files and must not be treated as a file mutation.
|
|
979
|
+
// Keep bare `>`/`>>` and explicit stdout `1>`/`1>>` guarded.
|
|
980
|
+
const looksLikeWrite = /(?:^|[;&|]\s*)(?:rm|mv|cp|install|truncate)\b|(?:^|\s)(?:tee|sed\s+-i|perl\s+-i)\b|(?:^|[\s;&|])(?:1)?>{1,2}(?![>=&])\s*\S/.test(
|
|
978
981
|
command,
|
|
979
982
|
);
|
|
980
983
|
return invokesWriter || (namesControlPath && looksLikeWrite);
|
package/src/constants.ts
CHANGED