Expand description
Configurable output size limits for agent safety.
When output exceeds the threshold, the full output is written to a
spill file on the real filesystem and ExecResult.out is truncated
with a pointer message. The agent can then selectively read the file.
Per-mode defaults: MCP kernels get an 8KB limit, REPL/test kernels
are unlimited. Runtime-switchable via the kaish-output-limit builtin.
Structs§
- Output
Limit Config - Configurable output size limit.
- Spill
Result - Result of a spill operation.
Functions§
- parse_
size - Parse a size string with optional K/M suffix into bytes.
- spill_
aware_ collect - Collect stdout from a child process with spill-aware size limiting.
- spill_
if_ needed - Check if the result output exceeds the limit and spill to disk if so.