Expand description
Provider plugin trait and input/output types for the Adaptive Cache Governor (ACG) system.
The ProviderPlugin trait defines the contract between ACG’s
provider-agnostic optimization pipeline and backend-specific
translation logic. Plugins receive a PluginInput containing
the original request, Prompt IR, intent bundle, and agent identity,
and produce a PluginOutput with the translated request and a
TranslationReport.
§Design
- Synchronous:
translateis a pure data transform (JSON restructuring), not an I/O operation. This matches theLlmCodecpattern incrates/core/src/codec/traits.rs. - Compatibility facade: provider plugins keep their existing synchronous trait surface, but can internally split translation into semantic hint planning plus request-surface application.
Send + Sync: Required for storage asArc<dyn ProviderPlugin>in concurrent contexts.- Object-safe: The trait is designed to be used as a trait object.
Structs§
- Plugin
Input - Input data provided to a plugin for translation.
- Plugin
Output - Output produced by a plugin after translation.
Traits§
- Provider
Plugin - Provider plugin trait for backend-specific translation.