Class: Brute::Middleware::CompactionCheck
- Extended by:
- GemKit::Deprecate
- Defined in:
- lib/brute/middleware/040_compaction_check.rb
Overview
The old compaction trigger, kept working while it is deprecated. DefaultCompactionPipeline is the layer that does the job.
It passes the turn through and compacts nothing, which is what it always did -- and it is deliberately not a subclass of its replacement, because inheriting would make a layer that did nothing suddenly start giving up context. A deprecation warns about a name; it does not change what the code under that name does.
Whatever it was configured with is accepted and ignored, so existing
use lines keep parsing until they are moved over:
use Brute::Middleware::DefaultCompactionPipeline,
window: 200_000,
summariser: Brute::Completion::OpenRouter.new(config: { access_token: key })
Constant Summary
Constants included from Hooks
Hooks::AFTER_LLM_EVENT, Hooks::AFTER_TOOL_EVENT, Hooks::APPROVE_TOOL_EVENT, Hooks::BEFORE_LLM_EVENT, Hooks::BEFORE_TOOL_EVENT, Hooks::COMPACTED_EVENT, Hooks::COMPACT_DURATION_EVENT, Hooks::DURATION_EVENT, Hooks::ENTER_EVENT, Hooks::EXIT_EVENT, Hooks::FARADAY_ERROR_EVENT, Hooks::LLM_DURATION_EVENT, Hooks::LLM_FAILURE_EVENT, Hooks::MIDDLEWARE_ADDED_EVENT, Hooks::OPEN_ROUTER_SERVER_ERROR_EVENT, Hooks::STANDARD_ERROR_EVENT, Hooks::TOOL_DURATION_EVENT, Hooks::TURN_DURATION_EVENT, Hooks::TURN_END_EVENT, Hooks::TURN_START_EVENT
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, **_options) ⇒ CompactionCheck
constructor
A new instance of CompactionCheck.
Methods included from Hooks
Constructor Details
#initialize(app, **_options) ⇒ CompactionCheck
Returns a new instance of CompactionCheck.
29 30 31 |
# File 'lib/brute/middleware/040_compaction_check.rb', line 29 def initialize(app, **) @app = app end |
Instance Method Details
#call(env) ⇒ Object
33 |
# File 'lib/brute/middleware/040_compaction_check.rb', line 33 def call(env) = @app.call(env) |