feat: lift shell read restrictions and page bash/read tool outputs to 200 lines

This commit is contained in:
Agent committed 2026-10-12 22:33:11 +00:00
1 parent ee78e6d3a8
commit de37af4b8c
7 files changed
+213 -32

No files matched your search

+4 -2
View File
@@ -162,8 +162,10 @@ test('guard denies shell edits/reads/searches and non-hashline write tools via t
return next()
}
assert.equal((await gate('bash', { command: 'sed -i s/a/b/ f.txt' })).kind, 'deny')
assert.equal((await gate('bash', { command: 'grep -rn foo .' })).kind, 'deny')
assert.equal((await gate('bash', { command: 'cat README.md' })).kind, 'deny')
assert.equal((await gate('bash', { command: 'grep -rn foo .' })).kind, 'allow')
assert.equal((await gate('bash', { command: 'cat README.md' })).kind, 'allow')
assert.equal((await gate('bash', { command: 'sed -n 1,5p README.md' })).kind, 'allow')
assert.equal((await gate('bash', { command: 'cat a > b' })).kind, 'deny')
h.write('exists.txt', 'old\n')
const d = await gate('write', { file_path: 'exists.txt', content: 'y' })
assert.equal(d.kind, 'deny')