These libraries are experimental. APIs may change without notice. Generated from source with koruc 0.1.7 on 10/5/2026.

Winnow

@korulang/winnow@0.0.1

Result shaping for agent-facing tool output — per-command grammar of filters, statics, diffs, and judged summaries applied at the tool-result boundary

winnow/index.kz · 7 tors· 4 internal

@korulang/winnow — result shaping for agent-facing tool output · 17 more lines
@korulang/winnow — result shaping for agent-facing tool output A command runs; something decides what the model actually sees. Winnow is that decision: a per-command grammar of filters, static replies, diffs, and judged summaries applied at the tool-result boundary — inside the scope proc or harness, never wrapped around a shell. See DESIGN.md for the full surface and the profiles grammar. V0 SCOPE — what is here is what works: the tier-1 line ops, pure string (head / tail / below / dedup) plus the regex trio over koru/pcre2 (extract.lines / remove.lines / grep — caller hands a bare pattern, winnow owns the whole-line wrap, compile, and free). The Myers diff, the koru/ai summarize tier, and the koru/odds escalation gate are designed in DESIGN.md and land as real lifts, in that order. Nothing here pretends to a tier it does not implement.

Phantom lifecycles

Derived from the phantom labels in the declarations below — state! issues an obligation the compiler will chase, !state discharges it, a bare state holds it without moving it. Nothing here is hand-drawn.

String 1 state view!

extract.lines

<view!> index.kz:210

remove.lines

<view!> index.kz:220