SIGN IN SIGN UP

fix(kibitzer): bound the sidecar grep scan and honor the turn signal

The resident sidecar's grep walked the whole workspace and read every file
under 1MB with no file, byte, or wall-clock budget, and budgeted() dropped the
AbortSignal senpi passes to AgentTool.execute, so a rarely matching pattern kept
reading long after the 90s wake deadline had aborted the child turn.

Tool closures now take (toolCallId, params, signal) and budgeted() forwards the
signal. caps.ts gains grepScanFiles (5000), grepScanBytes (64MB) and grepScanMs
(10s); the scan stops at the first limit that trips, at the match cap, or when
the signal aborts, keeping the matches found so far and naming the limit in
stopped. A run that trips nothing still returns exactly { matches, truncated }.
Y
YeonGyu-Kim committed
fb70106e67462efab494850fcc0f6744b44742a4
Parent: 879a8b7