Skip to main content Module ctx_read Copy item path Source ReadOutput Pre-counted read output carrying the output string, resolved mode,
and token count computed during mode processing. handle Reads a file through the cache and applies the requested compression mode. handle_fresh Like handle, but invalidates the cache first to force a fresh disk read. handle_fresh_with_task Fresh read with task-aware filtering (invalidates cache first). handle_fresh_with_task_resolved Fresh read with task-aware filtering, also returns the resolved mode name and pre-counted tokens. handle_with_task Reads a file with task-aware filtering to prioritize task-relevant content. handle_with_task_resolved Like handle_with_task, also returns the resolved mode name and pre-counted tokens. is_instruction_file read_file_lossy Reads a file as UTF-8 with lossy fallback, enforcing binary detection and max read size limit.
Defense-in-depth: verifies that the canonical path stays within the process’s project root
(if determinable) even though callers SHOULD have already jail-checked the path. try_stub_hit_readonly Attempt to serve a mode="full" cache hit ([unchanged …]) using only a
shared borrow of the cache.