Skip to main content

Crate clawft_plugin

Crate clawft_plugin 

Source
Expand description

Plugin trait definitions for clawft.

This crate defines the unified plugin architecture for the clawft AI assistant framework. It provides trait definitions for tools, channels, pipeline stages, skills, memory backends, and voice handlers – the six core extension points that all downstream feature work depends on.

§Trait Overview

TraitPurpose
ToolTool execution interface for agent capabilities
ChannelAdapterChannel message handling for external platforms
PipelineStageProcessing stage in the agent pipeline
SkillHigh-level agent capability with tools and instructions
MemoryBackendPluggable memory storage backend
VoiceHandlerVoice/audio processing (placeholder for Workstream G)

§Supporting Traits

TraitPurpose
KeyValueStoreKey-value storage exposed to plugins via ToolContext
ToolContextExecution context passed to tool/skill invocations
ChannelAdapterHostHost services for channel adapters

§Plugin Manifest

Plugins declare their capabilities, permissions, and resource limits through a PluginManifest, typically parsed from a JSON file (clawft.plugin.json).

§Feature Flags

  • voice – Enables the voice pipeline module (implies voice-vad).
  • voice-vad – Voice Activity Detection (Silero VAD stub).
  • voice-stt – Speech-to-Text (sherpa-rs stub).
  • voice-tts – Text-to-Speech (sherpa-rs stub).
  • voice-wake – Wake-word detection (reserved).

Re-exports§

pub use error::PluginError;
pub use manifest::PermissionDiff;
pub use manifest::PluginCapability;
pub use manifest::PluginManifest;
pub use manifest::PluginPermissions;
pub use manifest::PluginResourceConfig;
pub use message::MessagePayload;
pub use sandbox::SandboxAuditEntry;
pub use sandbox::SandboxPolicy;
pub use sandbox::SandboxType;
pub use sandbox::NetworkPolicy;
pub use sandbox::FilesystemPolicy;
pub use sandbox::ProcessPolicy;
pub use sandbox::EnvPolicy;
pub use traits::ChannelAdapter;
pub use traits::ChannelAdapterHost;
pub use traits::KeyValueStore;
pub use traits::MemoryBackend;
pub use traits::PipelineStage;
pub use traits::PipelineStageType;
pub use traits::Skill;
pub use traits::Tool;
pub use traits::ToolContext;
pub use traits::VoiceHandler;

Modules§

error
Plugin error types.
manifest
Plugin manifest types.
message
Message payload types for channel communication.
sandbox
Per-agent sandbox policy definitions.
traits
Plugin trait definitions.

Structs§

CancellationToken
A token which can be used to signal a cancellation request to one or more tasks.