Module: Rubino::Compression
- Defined in:
- lib/rubino/compression/compression_result.rb,
lib/rubino/compression/compressor.rb,
lib/rubino/compression/line_skeleton.rb,
lib/rubino/compression/content_router.rb,
lib/rubino/compression/log_compressor.rb,
lib/rubino/compression/diff_compressor.rb,
lib/rubino/compression/json_compressor.rb,
lib/rubino/compression/tsx_code_skeleton.rb,
lib/rubino/compression/ruby_code_skeleton.rb,
lib/rubino/compression/python_code_skeleton.rb,
lib/rubino/compression/javascript_code_skeleton.rb,
lib/rubino/compression/typescript_code_skeleton.rb,
lib/rubino/compression/tree_sitter_code_skeleton.rb
Overview
Deterministic, reversible compression of tool-read results. When the agent reads a LARGE code file just to understand its shape (a WHOLE-file read, no offset/limit), we hand back a SKELETON — requires, signatures, constants and small bodies kept verbatim; large method bodies elided behind an ACTIONABLE pointer that is itself a targeted read (‘read <path> offset=.. limit=..`).
The whole safety story is the DRILL-IN INVARIANT: exploration is cheap (skeleton), but the moment the model needs an exact body (e.g. to edit it) it issues the pointer’s targeted read and gets the ORIGINAL bytes back verbatim, so the edit tool’s exact-string match still works. Compression is lossy on the WHOLE-file view ONLY; every byte is one targeted read away.
Defined Under Namespace
Classes: CompressionResult, Compressor, ContentRouter, DiffCompressor, JavascriptCodeSkeleton, JsonCompressor, LineSkeleton, LogCompressor, PythonCodeSkeleton, RubyCodeSkeleton, TreeSitterCodeSkeleton, TsxCodeSkeleton, TypescriptCodeSkeleton