AmpAdapter

Struct AmpAdapter 

Source
pub struct AmpAdapter;
Expand description

Amp coding agent framework adapter.

This adapter is primarily used for framework identification and process detection. Since Amp doesn’t support hooks, most hook-related methods return minimal/empty values.

Trait Implementations§

Source§

impl FrameworkAdapter for AmpAdapter

Source§

fn name(&self) -> &'static str

Framework identifier (e.g., “claude”, “cursor”, “gemini”, “opencode”).
Source§

fn display_name(&self) -> &'static str

Human-readable display name for the framework.
Source§

fn project_config_path(&self) -> PathBuf

Config file path for project-level settings. Read more
Source§

fn user_config_path(&self) -> Option<PathBuf>

Config file path for user-level settings. Read more
Source§

fn generate_hooks_config( &self, _enabled_events: &[EventType], _mi6_bin: &str, _otel_enabled: bool, _otel_port: u16, ) -> Value

Generate hook configuration JSON for this framework. Read more
Source§

fn merge_config(&self, generated: Value, _existing: Option<Value>) -> Value

Merge generated hooks into existing settings. Read more
Source§

fn parse_hook_input( &self, _event_type: &str, stdin_json: &Value, ) -> ParsedHookInput

Parse hook input JSON from stdin into canonical fields. Read more
Source§

fn map_event_type(&self, framework_event: &str) -> EventType

Map a framework-specific event type to a canonical EventType. Read more
Source§

fn supported_events(&self) -> Vec<&'static str>

List of hook event types supported by this framework.
Source§

fn detection_env_vars(&self) -> &[&'static str]

Environment variables that indicate this framework is the caller.
Source§

fn is_installed(&self) -> bool

Check if this framework is installed on the system. Read more
Source§

fn remove_hooks(&self, _existing: Value) -> Option<Value>

Remove mi6 hooks from the framework’s settings. Read more
Source§

fn has_mi6_hooks(&self, _local: bool, _settings_local: bool) -> bool

Check if this framework has mi6 hooks active in its config file. Read more
Source§

fn resume_command(&self, _session_id: &str) -> Option<String>

Get the command to resume a session. Read more
Source§

fn framework_specific_events(&self) -> Vec<&'static str>

Framework-specific events that have no canonical equivalent. Read more
Source§

fn config_format(&self) -> ConfigFormat

Configuration file format used by this framework. Read more
Source§

fn detect(&self) -> bool

Detect if this framework is currently calling mi6. Read more
Source§

fn otel_support(&self) -> OtelSupport

Check OpenTelemetry support status for this framework. Read more
Source§

fn settings_path( &self, local: bool, settings_local: bool, ) -> Result<PathBuf, InitError>

Resolve the settings path for this framework. Read more
Source§

fn install_hooks( &self, path: &Path, hooks: &Value, otel_env: Option<Value>, remove_otel: bool, ) -> Result<InstallHooksResult, InitError>

Install hooks configuration to a settings file. Read more
Source§

fn serialize_config(&self, config: &Value) -> Result<String, InitError>

Serialize configuration to string in the appropriate format. Read more
Source§

fn uninstall_hooks( &self, local: bool, settings_local: bool, ) -> Result<UninstallHooksResult, InitError>

Uninstall mi6 hooks from this framework. Read more
Source§

fn hook_response(&self, _event_type: &str) -> Option<&'static str>

Get the JSON response to write to stdout for blocking hooks. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.