open-agents-ai 0.187.468 → 0.187.469
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/dist/index.js +294 -53
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -518601,41 +518601,98 @@ ${body}`;
|
|
|
518601
518601
|
if (!output || typeof output !== "string")
|
|
518602
518602
|
return null;
|
|
518603
518603
|
const text = output;
|
|
518604
|
-
const tail = text.slice(-
|
|
518605
|
-
if (/\
|
|
518604
|
+
const tail = text.slice(-4e3);
|
|
518605
|
+
if (/\berror\s+TS\d{3,5}\b/i.test(tail)) {
|
|
518606
518606
|
const m2 = tail.match(/error\s+TS\d{3,5}[^\n]{0,200}/i);
|
|
518607
|
-
return `
|
|
518607
|
+
return `Compile error: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518608
518608
|
}
|
|
518609
|
-
if (/\
|
|
518610
|
-
const m2 = tail.match(/
|
|
518611
|
-
return `
|
|
518609
|
+
if (/\berror\[E\d+\]/i.test(tail)) {
|
|
518610
|
+
const m2 = tail.match(/error\[E\d+\][^\n]{0,200}/i);
|
|
518611
|
+
return `Compile error: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518612
518612
|
}
|
|
518613
|
-
if (/\
|
|
518614
|
-
|
|
518613
|
+
if (/\berror\s+CS\d{3,5}\b/i.test(tail)) {
|
|
518614
|
+
const m2 = tail.match(/error\s+CS\d{3,5}[^\n]{0,200}/i);
|
|
518615
|
+
return `Compile error: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518615
518616
|
}
|
|
518616
|
-
if (
|
|
518617
|
-
const m2 = tail.match(/\d
|
|
518618
|
-
return `
|
|
518617
|
+
if (/(^|\n)\S+:\d+:\d+:\s+error:/i.test(tail)) {
|
|
518618
|
+
const m2 = tail.match(/\S+:\d+:\d+:\s+error:[^\n]{0,200}/i);
|
|
518619
|
+
return `Compile error: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518620
|
+
}
|
|
518621
|
+
if (/\bundefined\s+reference\s+to\b|\bld:\s+error:/i.test(tail)) {
|
|
518622
|
+
const m2 = tail.match(/(undefined\s+reference\s+to|ld:\s+error:)[^\n]{0,200}/i);
|
|
518623
|
+
return `Linker error: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518624
|
+
}
|
|
518625
|
+
if (/\b(Failed to compile|Compilation failed|Build failed|BUILD\s+FAIL(ED|URE))\b/i.test(tail)) {
|
|
518626
|
+
const m2 = tail.match(/(Failed to compile|Compilation failed|Build failed|BUILD\s+FAIL(?:ED|URE))[^\n]{0,300}/i);
|
|
518627
|
+
return `Build failed: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518628
|
+
}
|
|
518629
|
+
if (/\b\d+\s+errors?\s+(found|generated)\b/i.test(tail)) {
|
|
518630
|
+
const m2 = tail.match(/\d+\s+errors?\s+(?:found|generated)[^\n]{0,200}/i);
|
|
518631
|
+
return `Build reported errors: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518619
518632
|
}
|
|
518620
518633
|
if (/\bnpm\s+ERR!|\bnpm error code\b/i.test(tail)) {
|
|
518621
518634
|
const m2 = tail.match(/(npm\s+ERR!|npm error code)[^\n]{0,300}/i);
|
|
518622
|
-
return `
|
|
518635
|
+
return `Package install error: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518636
|
+
}
|
|
518637
|
+
if (/\bERROR:\s+Could not (install|find|build)\b/i.test(tail)) {
|
|
518638
|
+
const m2 = tail.match(/ERROR:\s+Could not[^\n]{0,200}/i);
|
|
518639
|
+
return `Package install error: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518640
|
+
}
|
|
518641
|
+
if (/\b(E:\s+(Unable to|Could not)|apt-get:\s+error|dnf:\s+(?:Error|Failed)|pacman:\s+error)/i.test(tail)) {
|
|
518642
|
+
const m2 = tail.match(/(E:\s+|apt-get:\s+error|dnf:\s+|pacman:\s+error)[^\n]{0,200}/i);
|
|
518643
|
+
return `System package error: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518644
|
+
}
|
|
518645
|
+
if (/\bTests?:\s+\d+\s+failed\b/i.test(tail)) {
|
|
518646
|
+
const m2 = tail.match(/Tests?:[^\n]{0,200}/i);
|
|
518647
|
+
return `Test failures: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518648
|
+
}
|
|
518649
|
+
if (/^FAILED\s+\S+::/m.test(tail) || /=+\s*\d+\s+failed/i.test(tail)) {
|
|
518650
|
+
const m2 = tail.match(/(FAILED\s+\S+|=+\s*\d+\s+failed)[^\n]{0,200}/i);
|
|
518651
|
+
return `Test failures: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518652
|
+
}
|
|
518653
|
+
if (/\b\d+\s+failing\b/i.test(tail) && /\bpassing\b/i.test(tail)) {
|
|
518654
|
+
const m2 = tail.match(/\d+\s+failing[^\n]{0,200}/i);
|
|
518655
|
+
return `Test failures: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518623
518656
|
}
|
|
518624
|
-
if (
|
|
518625
|
-
const m2 = tail.match(/
|
|
518626
|
-
return `Test failures
|
|
518657
|
+
if (/^---\s+FAIL:/m.test(tail) || /^FAIL\t\S+/m.test(tail)) {
|
|
518658
|
+
const m2 = tail.match(/(---\s+FAIL:[^\n]{0,200}|FAIL\t\S+[^\n]{0,200})/i);
|
|
518659
|
+
return `Test failures: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518627
518660
|
}
|
|
518628
|
-
if (
|
|
518629
|
-
const m2 = tail.match(/
|
|
518630
|
-
return `
|
|
518661
|
+
if (/test\s+result:\s+FAILED/i.test(tail)) {
|
|
518662
|
+
const m2 = tail.match(/test\s+result:\s+FAILED[^\n]{0,200}/i);
|
|
518663
|
+
return `Test failures: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518631
518664
|
}
|
|
518632
|
-
if (/\
|
|
518633
|
-
const m2 = tail.match(
|
|
518634
|
-
return `
|
|
518665
|
+
if (/\b\d+\s+failed\s+(of|out\s+of)\s+\d+\b/i.test(tail)) {
|
|
518666
|
+
const m2 = tail.match(/\d+\s+failed\s+(?:of|out\s+of)\s+\d+[^\n]{0,200}/i);
|
|
518667
|
+
return `Test failures: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518668
|
+
}
|
|
518669
|
+
if (/^Traceback \(most recent call last\):/m.test(tail) && /\w+(?:Error|Exception):\s/.test(tail)) {
|
|
518670
|
+
const m2 = tail.match(/\w+(?:Error|Exception):[^\n]{0,200}/);
|
|
518671
|
+
return `Runtime exception: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518672
|
+
}
|
|
518673
|
+
if (/\b(UnhandledPromiseRejection|throw\s+new\s+\w+|Uncaught\s+\w+Error)\b/i.test(tail)) {
|
|
518674
|
+
const m2 = tail.match(/(UnhandledPromiseRejection|throw\s+new\s+\w+|Uncaught[^\n]{0,200})/i);
|
|
518675
|
+
return `Runtime exception: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518676
|
+
}
|
|
518677
|
+
if (/\b(Exception\s+in\s+thread|java\.\w+(?:Error|Exception):)/i.test(tail)) {
|
|
518678
|
+
const m2 = tail.match(/(Exception\s+in\s+thread[^\n]{0,200}|java\.\w+(?:Error|Exception):[^\n]{0,200})/i);
|
|
518679
|
+
return `Runtime exception: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518680
|
+
}
|
|
518681
|
+
if (/^[\w./:-]+:\d+:in\s+`[^']*':\s+/m.test(tail) && /\b\w+Error\b/.test(tail)) {
|
|
518682
|
+
const m2 = tail.match(/\b\w+Error[^\n]{0,200}/);
|
|
518683
|
+
return `Runtime exception: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518684
|
+
}
|
|
518685
|
+
if (/\bthread\s+'[^']*'\s+panicked\s+at/i.test(tail)) {
|
|
518686
|
+
const m2 = tail.match(/thread\s+'[^']*'\s+panicked\s+at[^\n]{0,200}/i);
|
|
518687
|
+
return `Runtime panic: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518635
518688
|
}
|
|
518636
518689
|
if (/^(fatal|FATAL|panic):\s/m.test(tail)) {
|
|
518637
518690
|
const m2 = tail.match(/^(fatal|FATAL|panic):\s[^\n]{0,200}/m);
|
|
518638
|
-
return `Fatal error: ${(m2?.[0] ?? "").slice(0,
|
|
518691
|
+
return `Fatal error: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518692
|
+
}
|
|
518693
|
+
if (/\b(Segmentation\s+fault|core\s+dumped|Abort(?:ed)?\s+\(core dumped\)|Killed)\b/i.test(tail)) {
|
|
518694
|
+
const m2 = tail.match(/(Segmentation\s+fault|core\s+dumped|Abort(?:ed)?\s+\(core dumped\)|Killed)[^\n]{0,80}/i);
|
|
518695
|
+
return `Process terminated abnormally: ${(m2?.[0] ?? "").slice(0, 240)}`;
|
|
518639
518696
|
}
|
|
518640
518697
|
return null;
|
|
518641
518698
|
}
|
|
@@ -518692,6 +518749,7 @@ ${body}`;
|
|
|
518692
518749
|
if (/(^|[^&\d])(>|>>)\s*\S/.test(cmd))
|
|
518693
518750
|
return false;
|
|
518694
518751
|
const MUTATE_BINS = [
|
|
518752
|
+
// POSIX file/process mutators
|
|
518695
518753
|
"rm",
|
|
518696
518754
|
"mv",
|
|
518697
518755
|
"cp",
|
|
@@ -518699,56 +518757,158 @@ ${body}`;
|
|
|
518699
518757
|
"rmdir",
|
|
518700
518758
|
"chmod",
|
|
518701
518759
|
"chown",
|
|
518760
|
+
"chgrp",
|
|
518702
518761
|
"touch",
|
|
518703
518762
|
"tee",
|
|
518704
518763
|
"dd",
|
|
518705
518764
|
"truncate",
|
|
518706
518765
|
"ln",
|
|
518766
|
+
"install",
|
|
518707
518767
|
"kill",
|
|
518708
518768
|
"pkill",
|
|
518709
518769
|
"killall",
|
|
518710
518770
|
"reboot",
|
|
518711
518771
|
"shutdown",
|
|
518772
|
+
"halt",
|
|
518773
|
+
"poweroff",
|
|
518712
518774
|
"fakeroot",
|
|
518713
518775
|
"sudo",
|
|
518776
|
+
"doas",
|
|
518714
518777
|
"nohup",
|
|
518715
518778
|
"setsid",
|
|
518779
|
+
"su",
|
|
518780
|
+
// Build orchestrators (always trigger compile/test side-effects)
|
|
518716
518781
|
"make",
|
|
518782
|
+
"gmake",
|
|
518783
|
+
"ninja",
|
|
518717
518784
|
"gradle",
|
|
518785
|
+
"gradlew",
|
|
518718
518786
|
"mvn",
|
|
518787
|
+
"mvnw",
|
|
518788
|
+
"ant",
|
|
518789
|
+
"bazel",
|
|
518790
|
+
"buck",
|
|
518791
|
+
"buck2",
|
|
518792
|
+
"cmake",
|
|
518793
|
+
"meson",
|
|
518794
|
+
"scons",
|
|
518795
|
+
"rake",
|
|
518796
|
+
"leiningen",
|
|
518797
|
+
"lein",
|
|
518798
|
+
"sbt",
|
|
518799
|
+
"stack",
|
|
518800
|
+
// Configuration-management / orchestration
|
|
518719
518801
|
"ansible",
|
|
518720
|
-
"
|
|
518802
|
+
"ansible-playbook",
|
|
518803
|
+
"puppet",
|
|
518804
|
+
"chef-client",
|
|
518805
|
+
"salt",
|
|
518806
|
+
"salt-call",
|
|
518807
|
+
"systemd-run",
|
|
518808
|
+
"systemd-analyze",
|
|
518809
|
+
// System package managers
|
|
518810
|
+
"apt",
|
|
518811
|
+
"apt-get",
|
|
518812
|
+
"yum",
|
|
518813
|
+
"dnf",
|
|
518814
|
+
"rpm",
|
|
518815
|
+
"pacman",
|
|
518816
|
+
"zypper",
|
|
518817
|
+
"emerge",
|
|
518818
|
+
"snap",
|
|
518819
|
+
"flatpak",
|
|
518820
|
+
"brew",
|
|
518821
|
+
"port",
|
|
518822
|
+
"pkg",
|
|
518823
|
+
"apk",
|
|
518824
|
+
"choco",
|
|
518825
|
+
"scoop",
|
|
518826
|
+
"winget",
|
|
518827
|
+
// Helm / k8s-flavored
|
|
518828
|
+
"helm",
|
|
518829
|
+
"helmfile",
|
|
518830
|
+
"kustomize"
|
|
518721
518831
|
];
|
|
518722
518832
|
const mutateBinsRe = new RegExp(`\\b(${MUTATE_BINS.join("|")})\\b`, "i");
|
|
518723
518833
|
if (mutateBinsRe.test(cmd))
|
|
518724
518834
|
return false;
|
|
518725
518835
|
if (/\bsed\s+(-i|--in-place)\b/.test(cmd))
|
|
518726
518836
|
return false;
|
|
518727
|
-
if (/\bsystemctl\s+(?!status\b|show\b|is-)/i.test(cmd))
|
|
518837
|
+
if (/\bsystemctl\s+(?!status\b|show\b|is-|cat\b|list-|get-)/i.test(cmd))
|
|
518728
518838
|
return false;
|
|
518729
518839
|
if (/\bservice\s+\S+\s+(?!status\b)/i.test(cmd))
|
|
518730
518840
|
return false;
|
|
518731
518841
|
if (/\bcrontab\s+-(e|d|r)\b/.test(cmd))
|
|
518732
518842
|
return false;
|
|
518733
|
-
if (/\bnpm\s+(install|uninstall|update|run|test|exec|publish|init|link|unlink|version|cache\s+clean|ci|audit\s+fix)\b/i.test(cmd))
|
|
518734
|
-
return false;
|
|
518735
|
-
if (/\bpnpm\s+(install|update|add|remove|run|test|exec|publish|init|link|unlink|version)\b/i.test(cmd))
|
|
518843
|
+
if (/\bnpm\s+(install|i\b|uninstall|un\b|update|up\b|run\s|test\b|exec|publish|init|link|unlink|version|cache\s+clean|ci\b|audit\s+fix|prune|rebuild|adduser|login|logout|deprecate)\b/i.test(cmd))
|
|
518736
518844
|
return false;
|
|
518737
|
-
if (/\
|
|
518845
|
+
if (/\bpnpm\s+(install|i\b|update|up\b|add|remove|rm\b|run\s|test\b|exec|publish|init|link|unlink|version|prune|rebuild)\b/i.test(cmd))
|
|
518738
518846
|
return false;
|
|
518739
|
-
if (/\
|
|
518847
|
+
if (/\byarn\s+(install|add|remove|upgrade|run\s|test\b|exec|publish|init|link|unlink|version)\b/i.test(cmd))
|
|
518740
518848
|
return false;
|
|
518741
518849
|
if (/\bnpx\b/.test(cmd))
|
|
518742
518850
|
return false;
|
|
518743
|
-
if (/\
|
|
518851
|
+
if (/\bpip3?\s+(install|uninstall|wheel|download)\b/i.test(cmd))
|
|
518852
|
+
return false;
|
|
518853
|
+
if (/\bpipenv\s+(install|uninstall|run|update|sync)\b/i.test(cmd))
|
|
518854
|
+
return false;
|
|
518855
|
+
if (/\bpoetry\s+(add|install|run|update|remove|build|publish|init|new|export|lock)\b/i.test(cmd))
|
|
518856
|
+
return false;
|
|
518857
|
+
if (/\bconda\s+(install|remove|update|create|env\s+(create|update|remove))\b/i.test(cmd))
|
|
518858
|
+
return false;
|
|
518859
|
+
if (/\buv\s+(add|remove|sync|install|run|build|publish|pip\s+install)\b/i.test(cmd))
|
|
518860
|
+
return false;
|
|
518861
|
+
if (/\bbundle\s+(install|update|exec|add|remove|init)\b/i.test(cmd))
|
|
518862
|
+
return false;
|
|
518863
|
+
if (/\bgem\s+(install|uninstall|update|build|push|owner)\b/i.test(cmd))
|
|
518864
|
+
return false;
|
|
518865
|
+
if (/\bcpan\b|\bcpanm\b|\bperl\s+-MCPAN\b/i.test(cmd))
|
|
518866
|
+
return false;
|
|
518867
|
+
if (/\bcomposer\s+(install|update|require|remove|create-project|dump-autoload|run-script)\b/i.test(cmd))
|
|
518868
|
+
return false;
|
|
518869
|
+
if (/\bdotnet\s+(build|run|test|publish|pack|restore|add|remove|new|tool\s+install)\b/i.test(cmd))
|
|
518870
|
+
return false;
|
|
518871
|
+
if (/\bcargo\s+(build|run|test|bench|update|publish|install|uninstall|fmt|fix|clippy\s+--fix|new|init|add|remove|generate-lockfile)\b/i.test(cmd))
|
|
518872
|
+
return false;
|
|
518873
|
+
if (/\bgo\s+(build|run|test|get|install|generate|mod\s+(tidy|download|init|edit|vendor)|work\s+)\b/i.test(cmd))
|
|
518874
|
+
return false;
|
|
518875
|
+
if (/\bdocker\s+(build|run|push|pull|exec|kill|stop|rm|rmi|tag|create|cp|commit|save|load|import|export|network\s+create|volume\s+create|compose\s+(up|down|build|run|exec|restart))\b/i.test(cmd))
|
|
518876
|
+
return false;
|
|
518877
|
+
if (/\bpodman\s+(build|run|push|pull|exec|kill|stop|rm|rmi|tag|create|commit)\b/i.test(cmd))
|
|
518878
|
+
return false;
|
|
518879
|
+
if (/\bkubectl\s+(apply|delete|create|edit|patch|scale|rollout|exec|cp|drain|cordon|uncordon|taint|label|annotate|set\s)\b/i.test(cmd))
|
|
518880
|
+
return false;
|
|
518881
|
+
if (/\bterraform\s+(apply|destroy|init|plan|import|taint|untaint|workspace\s+(new|delete)|state\s+(rm|mv|push|replace-provider))\b/i.test(cmd))
|
|
518744
518882
|
return false;
|
|
518745
|
-
if (/\
|
|
518883
|
+
if (/\bpulumi\s+(up|destroy|new|stack\s+(rm|init)|config\s+set|policy\s+enable|import)\b/i.test(cmd))
|
|
518746
518884
|
return false;
|
|
518747
|
-
if (/\
|
|
518885
|
+
if (/\baws\s+(?:\S+\s+)+(create|delete|put|update|run|start|stop|terminate|attach|detach|cp|sync|mv)\b/i.test(cmd))
|
|
518748
518886
|
return false;
|
|
518749
|
-
if (/\
|
|
518887
|
+
if (/\bgcloud\s+(?:\S+\s+)+(create|delete|update|deploy|apply|set|enable|disable|attach|detach|reset|move|sign-in|sign-out)\b/i.test(cmd))
|
|
518750
518888
|
return false;
|
|
518751
|
-
if (/\
|
|
518889
|
+
if (/\baz\s+(?:\S+\s+)+(create|delete|update|deploy|set|attach|detach|reset|move)\b/i.test(cmd))
|
|
518890
|
+
return false;
|
|
518891
|
+
if (/\beslint\s+[^|;&]*--fix\b/i.test(cmd))
|
|
518892
|
+
return false;
|
|
518893
|
+
if (/\bprettier\s+[^|;&]*--write\b/i.test(cmd))
|
|
518894
|
+
return false;
|
|
518895
|
+
if (/\bblack\s+(?!--check\b)/i.test(cmd))
|
|
518896
|
+
return false;
|
|
518897
|
+
if (/\bisort\s+(?!--check\b|--diff\b)/i.test(cmd))
|
|
518898
|
+
return false;
|
|
518899
|
+
if (/\bruff\s+(?:format\b|check\s+[^|;&]*--fix\b)/i.test(cmd))
|
|
518900
|
+
return false;
|
|
518901
|
+
if (/\bgofmt\s+-w\b/i.test(cmd))
|
|
518902
|
+
return false;
|
|
518903
|
+
if (/\brustfmt\s+(?!--check\b)/i.test(cmd))
|
|
518904
|
+
return false;
|
|
518905
|
+
if (/\b(node|python\d?|ruby|perl|bash|sh|zsh|dash|fish)\s+-(e|c)\b/.test(cmd))
|
|
518906
|
+
return false;
|
|
518907
|
+
if (/\bcurl\s+[^|]*\|\s*(bash|sh|zsh|fish|python\d?|ruby|node|perl)\b/i.test(cmd))
|
|
518908
|
+
return false;
|
|
518909
|
+
if (/\bgit\s+(add|commit|push|pull|fetch|clone|init|checkout|switch|restore|reset|rm|mv|merge|rebase|cherry-pick|revert|stash|apply|am|tag(?:\s+\S)?|notes|worktree\s+(add|remove)|gc|prune|repack|filter-branch|filter-repo|reflog\s+(delete|expire)|update-ref|update-index|symbolic-ref|hash-object\s+-w)\b/i.test(cmd))
|
|
518910
|
+
return false;
|
|
518911
|
+
if (/\bollama\s+(pull|push|run|create|rm|cp|serve)\b/i.test(cmd))
|
|
518752
518912
|
return false;
|
|
518753
518913
|
const READ_ONLY_BINS = /* @__PURE__ */ new Set([
|
|
518754
518914
|
"cd",
|
|
@@ -518758,79 +518918,128 @@ ${body}`;
|
|
|
518758
518918
|
"fgrep",
|
|
518759
518919
|
"rg",
|
|
518760
518920
|
"ag",
|
|
518921
|
+
"ack",
|
|
518761
518922
|
"cat",
|
|
518762
518923
|
"head",
|
|
518763
518924
|
"tail",
|
|
518764
518925
|
"less",
|
|
518765
518926
|
"more",
|
|
518927
|
+
"bat",
|
|
518928
|
+
"tac",
|
|
518766
518929
|
"ls",
|
|
518767
518930
|
"ll",
|
|
518768
518931
|
"la",
|
|
518932
|
+
"tree",
|
|
518769
518933
|
"find",
|
|
518770
|
-
|
|
518934
|
+
"fd",
|
|
518935
|
+
// mutating actions pre-filtered above
|
|
518771
518936
|
"wc",
|
|
518772
518937
|
"awk",
|
|
518773
518938
|
"gawk",
|
|
518939
|
+
"mawk",
|
|
518940
|
+
"nawk",
|
|
518774
518941
|
"sort",
|
|
518775
518942
|
"uniq",
|
|
518943
|
+
"shuf",
|
|
518776
518944
|
"tr",
|
|
518777
518945
|
"cut",
|
|
518778
518946
|
"paste",
|
|
518779
518947
|
"join",
|
|
518780
518948
|
"comm",
|
|
518949
|
+
"column",
|
|
518950
|
+
"expand",
|
|
518951
|
+
"unexpand",
|
|
518781
518952
|
"diff",
|
|
518782
518953
|
"cmp",
|
|
518954
|
+
"patch",
|
|
518955
|
+
// patch with -R or no-args could be mutating; --dry-run only is read
|
|
518783
518956
|
"echo",
|
|
518784
518957
|
"printf",
|
|
518785
518958
|
"pwd",
|
|
518786
518959
|
"which",
|
|
518787
518960
|
"type",
|
|
518788
518961
|
"command",
|
|
518789
|
-
"
|
|
518790
|
-
"python",
|
|
518791
|
-
"python3",
|
|
518792
|
-
"ruby",
|
|
518793
|
-
"perl",
|
|
518962
|
+
"whereis",
|
|
518794
518963
|
"git",
|
|
518795
|
-
//
|
|
518964
|
+
// pre-filtered above for mutating subcommands
|
|
518796
518965
|
"ollama",
|
|
518797
|
-
//
|
|
518966
|
+
// pre-filtered above
|
|
518798
518967
|
"cargo",
|
|
518799
|
-
// pre-filtered above for build/run/etc.
|
|
518800
518968
|
"go",
|
|
518801
|
-
|
|
518969
|
+
"rustc",
|
|
518970
|
+
// bin-only forms are read; mutating subcommands pre-filtered
|
|
518802
518971
|
"stat",
|
|
518803
518972
|
"file",
|
|
518804
518973
|
"du",
|
|
518805
518974
|
"df",
|
|
518975
|
+
"lsof",
|
|
518976
|
+
"fuser",
|
|
518806
518977
|
"date",
|
|
518807
518978
|
"uname",
|
|
518808
518979
|
"id",
|
|
518809
518980
|
"whoami",
|
|
518810
518981
|
"hostname",
|
|
518811
518982
|
"uptime",
|
|
518983
|
+
"tty",
|
|
518812
518984
|
"env",
|
|
518813
518985
|
"printenv",
|
|
518986
|
+
"set",
|
|
518814
518987
|
"test",
|
|
518815
518988
|
"[",
|
|
518816
518989
|
"true",
|
|
518817
518990
|
"false",
|
|
518991
|
+
"yes",
|
|
518992
|
+
"seq",
|
|
518818
518993
|
"tsc",
|
|
518819
518994
|
"eslint",
|
|
518820
518995
|
"prettier",
|
|
518821
|
-
|
|
518822
|
-
"
|
|
518823
|
-
"
|
|
518996
|
+
"ruff",
|
|
518997
|
+
"black",
|
|
518998
|
+
"isort",
|
|
518999
|
+
"rustfmt",
|
|
519000
|
+
"gofmt",
|
|
519001
|
+
// Linters/formatters: mutating modes pre-filtered above (--fix/--write/-w/-i),
|
|
519002
|
+
// so reaching here means we have a check-only invocation.
|
|
518824
519003
|
"jq",
|
|
518825
519004
|
"yq",
|
|
518826
519005
|
"xq",
|
|
519006
|
+
"tomlq",
|
|
519007
|
+
"fx",
|
|
518827
519008
|
"base64",
|
|
518828
519009
|
"md5sum",
|
|
518829
519010
|
"sha256sum",
|
|
518830
519011
|
"sha1sum",
|
|
519012
|
+
"sha512sum",
|
|
518831
519013
|
"tldr",
|
|
518832
519014
|
"man",
|
|
518833
|
-
"info"
|
|
519015
|
+
"info",
|
|
519016
|
+
"help",
|
|
519017
|
+
"pip",
|
|
519018
|
+
"pip3",
|
|
519019
|
+
"pipenv",
|
|
519020
|
+
"poetry",
|
|
519021
|
+
"uv",
|
|
519022
|
+
"conda",
|
|
519023
|
+
// pre-filtered above for mutating subcommands
|
|
519024
|
+
"npm",
|
|
519025
|
+
"pnpm",
|
|
519026
|
+
"yarn",
|
|
519027
|
+
// pre-filtered above
|
|
519028
|
+
"kubectl",
|
|
519029
|
+
"terraform",
|
|
519030
|
+
"pulumi",
|
|
519031
|
+
"aws",
|
|
519032
|
+
"gcloud",
|
|
519033
|
+
"az",
|
|
519034
|
+
// pre-filtered above
|
|
519035
|
+
"docker",
|
|
519036
|
+
"podman",
|
|
519037
|
+
// pre-filtered above
|
|
519038
|
+
"composer",
|
|
519039
|
+
"dotnet",
|
|
519040
|
+
"bundle",
|
|
519041
|
+
"gem"
|
|
519042
|
+
// pre-filtered above
|
|
518834
519043
|
]);
|
|
518835
519044
|
if (/\bfind\b[\s\S]*?(-delete|-exec\s+(rm|mv|cp|chmod|chown|sed\s+-i)|--?ok\s+(rm|mv))/i.test(cmd))
|
|
518836
519045
|
return false;
|
|
@@ -518839,11 +519048,42 @@ ${body}`;
|
|
|
518839
519048
|
const segments = cmd.split(/(?:\|\||&&|;)/).map((s2) => s2.trim()).filter(Boolean);
|
|
518840
519049
|
if (segments.length === 0)
|
|
518841
519050
|
return false;
|
|
519051
|
+
const SAFE_INTERP_FLAGS = /^(?:--version|--help|-V|-v|-h|--vers|version)$/;
|
|
519052
|
+
const INTERPRETER_BINS = /* @__PURE__ */ new Set([
|
|
519053
|
+
"node",
|
|
519054
|
+
"python",
|
|
519055
|
+
"python2",
|
|
519056
|
+
"python3",
|
|
519057
|
+
"ruby",
|
|
519058
|
+
"perl",
|
|
519059
|
+
"php",
|
|
519060
|
+
"lua",
|
|
519061
|
+
"bash",
|
|
519062
|
+
"sh",
|
|
519063
|
+
"zsh",
|
|
519064
|
+
"dash",
|
|
519065
|
+
"fish",
|
|
519066
|
+
"ksh",
|
|
519067
|
+
"tcsh",
|
|
519068
|
+
"java",
|
|
519069
|
+
"kotlin",
|
|
519070
|
+
"scala",
|
|
519071
|
+
"groovy"
|
|
519072
|
+
]);
|
|
518842
519073
|
for (const seg of segments) {
|
|
518843
519074
|
const stripped = seg.replace(/^cd\s+\S+\s*$/i, "true").replace(/^!/, "");
|
|
518844
|
-
const
|
|
519075
|
+
const tokens = stripped.split(/\s+/).filter(Boolean);
|
|
519076
|
+
const firstTok = (tokens[0] ?? "").replace(/^.*\//, "");
|
|
518845
519077
|
if (!firstTok)
|
|
518846
519078
|
continue;
|
|
519079
|
+
if (INTERPRETER_BINS.has(firstTok)) {
|
|
519080
|
+
const restToks = tokens.slice(1);
|
|
519081
|
+
if (restToks.length === 0)
|
|
519082
|
+
return false;
|
|
519083
|
+
if (!restToks.every((t2) => SAFE_INTERP_FLAGS.test(t2)))
|
|
519084
|
+
return false;
|
|
519085
|
+
continue;
|
|
519086
|
+
}
|
|
518847
519087
|
if (!READ_ONLY_BINS.has(firstTok))
|
|
518848
519088
|
return false;
|
|
518849
519089
|
}
|
|
@@ -518852,10 +519092,11 @@ ${body}`;
|
|
|
518852
519092
|
/**
|
|
518853
519093
|
* REG-5: Render the recent-failures block so the agent SEES its own error
|
|
518854
519094
|
* output before deciding what to do next. Detects same-fingerprint failure
|
|
518855
|
-
* repetition and escalates the warning. Without this, the agent runs
|
|
518856
|
-
*
|
|
518857
|
-
*
|
|
518858
|
-
*
|
|
519095
|
+
* repetition and escalates the warning. Without this, the agent runs a
|
|
519096
|
+
* build/test/install command, gets a long error stream from the
|
|
519097
|
+
* underlying compiler/runner, ignores the specific error, and blindly
|
|
519098
|
+
* retries with a different flag combination. Caching the failure +
|
|
519099
|
+
* injecting it pre-LLM forces the model to confront what actually broke.
|
|
518859
519100
|
*/
|
|
518860
519101
|
_renderRecentFailuresBlock(turn) {
|
|
518861
519102
|
const fails = this._recentFailures;
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "open-agents-ai",
|
|
3
|
-
"version": "0.187.
|
|
3
|
+
"version": "0.187.469",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "open-agents-ai",
|
|
9
|
-
"version": "0.187.
|
|
9
|
+
"version": "0.187.469",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "CC-BY-NC-4.0",
|
|
12
12
|
"dependencies": {
|
package/package.json
CHANGED