Skip to main content

Module plugin

Module plugin 

Source
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: translate is a pure data transform (JSON restructuring), not an I/O operation. This matches the LlmCodec pattern in crates/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 as Arc<dyn ProviderPlugin> in concurrent contexts.
  • Object-safe: The trait is designed to be used as a trait object.

Structs§

PluginInput
Input data provided to a plugin for translation.
PluginOutput
Output produced by a plugin after translation.

Traits§

ProviderPlugin
Provider plugin trait for backend-specific translation.