Repository navigation
Commit bf1c084
zhansheng.lzs
acli: sync the write_file temp-dir fix from agenticCLI 749999a
write_file refused any path outside the cwd, which made it stricter than every
layer around it without protecting anything: run_command can already write to
temp because the shell is not path-guarded, delete_file reaches anywhere behind
its own prompt, and the opt-in OS sandbox confines writes to "the workspace and
temp areas". The refusal also cost more than a failed call — models reach for
/tmp for scratch files by instinct, so the retry put the scratch file in the
user's repo instead, which is the worse outcome.
Writes now land in the cwd or the realpath'd system temp dir. Both sides are
resolved with realpath, so a symlink inside either root still cannot escape,
and validate_path runs first so SENSITIVE_NAMES keeps blocking e.g.
/tmp/.ssh/config. The refusal message names both roots generically rather than
echoing absolute paths.
Per-file sync only: the two files are byte-identical to agenticCLI modulo the
acli. -> dashscope.acli. import rewrite. examples/ was preserved by the sync
script, and no version is bumped -- agenticCLI stays at 0.6.7.1 parent db76344 commit bf1c084
2 files changed
Lines changed: 49 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
64 | 98 | | |
65 | 99 | | |
66 | 100 | | |
67 | | - | |
| 101 | + | |
| 102 | + | |
68 | 103 | | |
69 | 104 | | |
70 | 105 | | |
71 | 106 | | |
72 | 107 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
80 | 119 | | |
81 | 120 | | |
82 | 121 | | |
| |||
0 commit comments