Skip to main content

PlatformProvider

Trait PlatformProvider 

Source
pub trait PlatformProvider {
    // Required methods
    fn name(&self) -> &str;
    fn display_name(&self) -> &str;
    fn detect(&self) -> DetectionResult;
    fn format_inbound(&self, message: &InboundMessage) -> InboundRequest;
    fn default_webhook_port(&self) -> u16;
    fn config_path(&self) -> Option<PathBuf>;
    fn install(&self, opts: &InstallOptions) -> Result<InstallResult>;
    fn verify(&self) -> Result<VerifyResult>;
    fn doctor(
        &self,
        opts: &ProviderDoctorOptions,
    ) -> Result<ProviderDoctorResult>;
    fn setup(&self, opts: &ProviderSetupOptions) -> Result<ProviderSetupResult>;
    fn relay_test(
        &self,
        opts: &ProviderRelayTestOptions,
    ) -> Result<ProviderRelayTestResult>;

    // Provided method
    fn default_webhook_host(&self) -> &str { ... }
}

Required Methods§

Source

fn name(&self) -> &str

Provider name (e.g., “openclaw”, “picoclaw”, “nanobot”, “nanoclaw”)

Source

fn display_name(&self) -> &str

Human-readable display name

Source

fn detect(&self) -> DetectionResult

Detect if this platform is installed on the current system

Source

fn format_inbound(&self, message: &InboundMessage) -> InboundRequest

Format an inbound message for this platform’s webhook

Source

fn default_webhook_port(&self) -> u16

Get the platform’s default webhook port

Source

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

Get config file path for this platform

Source

fn install(&self, opts: &InstallOptions) -> Result<InstallResult>

Install/configure the webhook channel for this platform

Source

fn verify(&self) -> Result<VerifyResult>

Verify the installation is working

Source

fn doctor(&self, opts: &ProviderDoctorOptions) -> Result<ProviderDoctorResult>

Run provider-specific diagnostics.

Source

fn setup(&self, opts: &ProviderSetupOptions) -> Result<ProviderSetupResult>

Persist provider-specific relay setup.

Source

fn relay_test( &self, opts: &ProviderRelayTestOptions, ) -> Result<ProviderRelayTestResult>

Send a provider-specific relay probe to validate webhook delivery.

Provided Methods§

Source

fn default_webhook_host(&self) -> &str

Get the platform’s default webhook host

Implementors§