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
impl FrameworkAdapter for AmpAdapter
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Framework identifier (e.g., “claude”, “cursor”, “gemini”, “opencode”).
Source§fn display_name(&self) -> &'static str
fn display_name(&self) -> &'static str
Human-readable display name for the framework.
Source§fn project_config_path(&self) -> PathBuf
fn project_config_path(&self) -> PathBuf
Config file path for project-level settings. Read more
Source§fn user_config_path(&self) -> Option<PathBuf>
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
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
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
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
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>
fn supported_events(&self) -> Vec<&'static str>
List of hook event types supported by this framework.
Source§fn detection_env_vars(&self) -> &[&'static str]
fn detection_env_vars(&self) -> &[&'static str]
Environment variables that indicate this framework is the caller.
Source§fn is_installed(&self) -> bool
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>
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
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>
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>
fn framework_specific_events(&self) -> Vec<&'static str>
Framework-specific events that have no canonical equivalent. Read more
Source§fn config_format(&self) -> ConfigFormat
fn config_format(&self) -> ConfigFormat
Configuration file format used by this framework. Read more
Source§fn otel_support(&self) -> OtelSupport
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>
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>
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>
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>
fn uninstall_hooks( &self, local: bool, settings_local: bool, ) -> Result<UninstallHooksResult, InitError>
Uninstall mi6 hooks from this framework. Read more
Auto Trait Implementations§
impl Freeze for AmpAdapter
impl RefUnwindSafe for AmpAdapter
impl Send for AmpAdapter
impl Sync for AmpAdapter
impl Unpin for AmpAdapter
impl UnwindSafe for AmpAdapter
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