systemprompt-extension 0.2.1

Compile-time extension framework for systemprompt.io AI governance infrastructure. Built on the inventory crate — registers schemas, API routes, jobs, and providers in the MCP governance pipeline.
Documentation

systemprompt-extension

Extension framework for systemprompt.io - register custom modules, providers, and APIs.

Crates.io Documentation License: BUSL-1.1

Overview

Part of the Shared layer in the systemprompt.io architecture. Integrations · Extensible Architecture

Provides the infrastructure for building and loading systemprompt.io extensions. Extensions can add new routes, services, and capabilities to the platform.

Installation

Add to your Cargo.toml:

[dependencies]
systemprompt-extension = "0.0.1"

Quick Example

use systemprompt_extension::prelude::*;

struct MyExtension;

impl Extension for MyExtension {
    fn id(&self) -> &str { "my-extension" }
    fn name(&self) -> &str { "My Extension" }
    fn version(&self) -> &str { "1.0.0" }
}

register_extension!(MyExtension);

Feature Flags

Feature Default Description
web Yes HTTP API routes via Axum
plugin-discovery No Dynamic plugin loading

Key Types

  • ExtensionContext - Runtime context for extensions
  • ExtensionError - Error types for extension operations
  • ExtensionLoader - Registration and loading system

Dependencies

  • async-trait - Async trait support
  • axum - Router types (optional, with web feature)
  • inventory - Compile-time extension registration
  • reqwest - HTTP client (optional, with web feature)

Usage

use systemprompt_extension::{Extension, ExtensionMetadata, ExtensionRole};

pub struct MyExtension;

impl Extension for MyExtension {
    fn metadata(&self) -> ExtensionMetadata {
        ExtensionMetadata {
            name: "my-extension".into(),
            version: "0.1.0".into(),
            role: ExtensionRole::Domain,
            ..Default::default()
        }
    }
}

License

Business Source License 1.1 - See LICENSE for details.