pub struct CompactionPlugin {
pub config: CompactionConfig,
}Expand description
Plugin that integrates context compaction state into the plugin system.
Registers the CompactionStateKey state key so that compaction boundaries
are tracked durably and available to other plugins and external observers.
Accepts an optional CompactionConfig for configurable prompts and thresholds.
Fields§
§config: CompactionConfigCompaction configuration (prompts, model, thresholds).
Implementations§
Source§impl CompactionPlugin
impl CompactionPlugin
Sourcepub fn new(config: CompactionConfig) -> Self
pub fn new(config: CompactionConfig) -> Self
Create with explicit config.
Trait Implementations§
Source§impl Clone for CompactionPlugin
impl Clone for CompactionPlugin
Source§fn clone(&self) -> CompactionPlugin
fn clone(&self) -> CompactionPlugin
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompactionPlugin
impl Debug for CompactionPlugin
Source§impl Default for CompactionPlugin
impl Default for CompactionPlugin
Source§fn default() -> CompactionPlugin
fn default() -> CompactionPlugin
Returns the “default value” for a type. Read more
Source§impl Plugin for CompactionPlugin
impl Plugin for CompactionPlugin
fn descriptor(&self) -> PluginDescriptor
Source§fn register(&self, registrar: &mut PluginRegistrar) -> Result<(), StateError>
fn register(&self, registrar: &mut PluginRegistrar) -> Result<(), StateError>
Declare capabilities: state keys, hooks, action handlers, effect handlers, permission checkers.
Called once per resolve to build the ExecutionEnv.
Source§fn on_activate(
&self,
_agent_spec: &AgentSpec,
_patch: &mut MutationBatch,
) -> Result<(), StateError>
fn on_activate( &self, _agent_spec: &AgentSpec, _patch: &mut MutationBatch, ) -> Result<(), StateError>
Agent activated: read spec config, write initial state.
Called when this plugin becomes active for a specific agent.
Source§fn bind_runtime_context(
&self,
_store: &StateStore,
_owner_inbox: Option<&InboxSender>,
)
fn bind_runtime_context( &self, _store: &StateStore, _owner_inbox: Option<&InboxSender>, )
Bind per-run runtime context to the plugin instance. Read more
Source§fn config_schemas(&self) -> Vec<ConfigSchema>
fn config_schemas(&self) -> Vec<ConfigSchema>
Declare config section schemas for eager validation during resolve. Read more
Source§fn on_deactivate(&self, _patch: &mut MutationBatch) -> Result<(), StateError>
fn on_deactivate(&self, _patch: &mut MutationBatch) -> Result<(), StateError>
Agent deactivated: clean up agent-scoped state.
Called when switching away from an agent that uses this plugin.
Auto Trait Implementations§
impl Freeze for CompactionPlugin
impl RefUnwindSafe for CompactionPlugin
impl Send for CompactionPlugin
impl Sync for CompactionPlugin
impl Unpin for CompactionPlugin
impl UnsafeUnpin for CompactionPlugin
impl UnwindSafe for CompactionPlugin
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more