Skip to content

Commit eb91b6b

Browse files
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

File tree

cmd/odek/main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,6 +1410,11 @@ func builtinTools(dc danger.DangerousConfig, sm *skills.SkillManager, approver d
14101410
&jsonQueryTool{dangerousConfig: dc},
14111411
&treeTool{dangerousConfig: dc},
14121412
&checksumTool{dangerousConfig: dc},
1413+
&sortTool{dangerousConfig: dc},
1414+
&headTailTool{dangerousConfig: dc},
1415+
&base64Tool{dangerousConfig: dc},
1416+
&trTool{dangerousConfig: dc},
1417+
&wordCountTool{dangerousConfig: dc},
14131418
newBrowserTool(dc),
14141419
}
14151420

0 commit comments

Comments
 (0)