pub struct ContextTransformPlugin { /* private fields */ }Expand description
Plugin that registers the built-in context truncation request transform.
Wraps a ContextWindowPolicy and registers a ContextTransform via
register_request_transform() during plugin registration. This ensures
the transform flows through the standard plugin mechanism (ADR-0001)
instead of being manually appended post-hoc.
Implementations§
Source§impl ContextTransformPlugin
impl ContextTransformPlugin
pub fn new(policy: ContextWindowPolicy) -> Self
Trait Implementations§
Source§impl Plugin for ContextTransformPlugin
impl Plugin for ContextTransformPlugin
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 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_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 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 ContextTransformPlugin
impl RefUnwindSafe for ContextTransformPlugin
impl Send for ContextTransformPlugin
impl Sync for ContextTransformPlugin
impl Unpin for ContextTransformPlugin
impl UnsafeUnpin for ContextTransformPlugin
impl UnwindSafe for ContextTransformPlugin
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