Commit eb91b6b
committed
feat(tools): 5 more native perf tools — sort, head_tail, base64, tr, word_count
sort — Sort lines in one or more files natively. Supports asc/desc,
unique, numeric, case-insensitive, reverse. Replaces sort fork.
head_tail — Read first/last N lines of files (streaming, parallel).
head: stops after N lines (no full-file read). tail: ring buffer.
Replaces head -n, tail -n forks.
base64 — Encode/decode base64 for files or inline strings. Uses Go
encoding/base64 stdlib. Replaces base64 fork.
tr — Native text transformation: case conversion (upper/lower),
string substitution, character replacement, character deletion.
Chainable transformations applied in order. Replaces tr, sed forks.
word_count — Streaming word counter (words, lines, chars, bytes) for
up to 20 files in parallel. Replaces full wc fork.
Security: all gated through danger.ClassifyPath + CheckOperation,
O_NOFOLLOW on file opens, registered in classifyToolCall() for
batch approval gate. 17 new tests. 0 new dependencies.1 parent 7a4b59b commit eb91b6b
4 files changed
Lines changed: 1009 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1410 | 1410 | | |
1411 | 1411 | | |
1412 | 1412 | | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
1413 | 1418 | | |
1414 | 1419 | | |
1415 | 1420 | | |
| |||
0 commit comments