Expand description
§razeri-plugin-api
Extension point traits and registries for the Razeri platform.
This crate defines the plugin API surface — the traits that third-party developers implement to extend Razeri with new database dialects, storage backends, LLM providers, language renderers, and event sinks.
§Extension Points
| Trait | Registry | Key Type |
|---|---|---|
PlatformDialect | PlatformRegistry | string (canonical name) |
StorageProviderFactory | StorageRegistry | StoragePlatform enum + string |
LlmClientFactory / LlmClient | LlmRegistry | string |
LlmModelAdapter | ModelRegistry | (provider, model) pair |
LanguageRendererFactory | LanguageRegistry | string |
EventSink | EventRegistry | fan-out (all sinks) |
§Beside the extension points
| Module | What it holds |
|---|---|
conformance | the report that grades a dialect against everything it owes, run from the dialect’s own tests |
resolve | a platform name, an alias or name@version, turned into the dialect that renders it |
process | the one dialect registry a process resolves names against, and the plugin directory that feeds it |
dynamic | loading a plugin built as a shared library, and refusing one built differently from the razeri that loads it |
alerting | alert rules and health summaries evaluated over the event stream |
sinks | the event sinks razeri ships, written against the same EventSink trait a plugin implements |
§Composition Root
Use PluginRegistryBuilder to wire everything together at application
startup, then pass the resulting PluginRegistry to subsystems. The
builder’s own page shows it in use.
Re-exports§
pub use builder::PluginRegistryBuilder;pub use dialect::BlockTerminator;pub use dialect::DeployClient;pub use dialect::DeployScript;pub use dialect::DialectHandle;pub use dialect::DialectInfo;pub use dialect::PlatformDialect;pub use dialect::PlatformRegistry;pub use dialect::UnsupportedVersion;pub use dynamic::BuildDeclaration;pub use dynamic::BuildDeclarationFn;pub use dynamic::BuildPart;pub use dynamic::PLUGIN_BUILD_SYMBOL;pub use dynamic::PLUGIN_REGISTER_SYMBOL;pub use dynamic::PluginLoadResult;pub use dynamic::PluginRefusal;pub use dynamic::RegisterPluginFn;pub use dynamic::load_plugins_from_dir;pub use error::EventSinkError;pub use error::LanguageError;pub use error::LlmError;pub use error::StorageError;pub use event::EventCategory;pub use event::EventEmitter;pub use event::EventFilterKeys;pub use event::EventPayload;pub use event::EventQuery;pub use event::EventRegistry;pub use event::EventSeverity;pub use event::EventSink;pub use event::EventSubject;pub use event::EventSubjectKind;pub use event::EventSummary;pub use event::EventValidationError;pub use event::RazeriEvent;pub use event::WorkflowContext;pub use language::LanguageRegistry;pub use language::LanguageRenderer;pub use language::LanguageRendererFactory;pub use llm::ChatResponse;pub use llm::LlmClient;pub use llm::LlmClientFactory;pub use llm::LlmRegistry;pub use llm::Message;pub use llm::ModelInfo;pub use llm::TokenUsage;pub use model::LlmModelAdapter;pub use model::ModelCapabilities;pub use model::ModelRegistry;pub use process::InstallError;pub use process::PLUGIN_DIR_ENV;pub use process::PluginDirReport;pub use process::install_plugin_dir;pub use process::plugin_dir_from_environment;pub use process::plugin_dir_report;pub use process::process_event_sinks;pub use process::process_registry;pub use registry::PluginRegistry;pub use resolve::ResolveError;pub use storage::StorageListEntry;pub use storage::StorageMetadata;pub use storage::StorageOps;pub use storage::StorageProviderFactory;pub use storage::StorageRegistry;pub use sinks::jsonl::JsonlSink;pub use sinks::stdout::StdoutSink;pub use sinks::webhook::WebhookSink;pub use sinks::EventSinkConfig;pub use sinks::create_sink;pub use alerting::AlertCondition;pub use alerting::AlertMetric;pub use alerting::AlertResult;pub use alerting::AlertRule;pub use alerting::AlertScope;pub use alerting::ComparisonOp;pub use alerting::HealthDomain;pub use alerting::HealthStatus;pub use alerting::HealthSummary;pub use alerting::SinkStatus;pub use alerting::discover_health;pub use alerting::evaluate_rules;pub use alerting::health_for_domain;pub use builder::DialectRegistration;pub use builder::EventSinkRegistration;pub use builder::LanguageRegistration;pub use builder::LlmRegistration;pub use builder::ModelRegistration;pub use builder::PluginRegistration;pub use builder::StorageRegistration;pub use razeri_plugin_contract;
Modules§
- alerting
- Alerting and health summary model for the canonical event stream.
- builder
- Fluent builder for constructing a
PluginRegistryat application startup. - conformance
- Every obligation a dialect owes, reported at once.
- dialect
- Platform dialect trait and registry for database SQL rendering.
- dynamic
- Loading plugins built as shared libraries.
- error
- Error types for Razeri plugin API.
- event
- Structured event sink trait and fan-out registry.
- language
- Language renderer factory trait and registry.
- llm
- LLM client factory trait and registry.
- model
- LLM model adapter trait and registry.
- process
- One dialect registry per process.
- registry
- Unified plugin registry aggregating all sub-registries.
- resolve
- Resolving a platform name to the dialect that renders it.
- routine_
render - The named routine grammars, spelled.
- sinks
- Built-in event sinks, implemented against the same public traits a third-party sink uses — nothing here has access a plugin author lacks.
- storage
- Storage provider factory trait and registry.
Macros§
- export_
plugin - Make a crate a razeri plugin, in one line.
Structs§
- Engine
Version - A version of an engine:
17,8.4,2022,23ai.
Enums§
- Engine
Version Error - Why a spelling is not a version, with the spelling that is, where there is one.
Functions§
- render_
procedure_ as - Spell this procedure in a named grammar.
- render_
scalar_ function_ as - Spell this scalar function in a named grammar.
- render_
table_ function_ as - Spell this table-valued function in a named grammar.
- resolve_
dialect_ by_ name - Resolve a platform name to the dialect that renders it.
- try_
resolve_ dialect_ by_ name - Resolve a dialect by string name, returning
Noneon failure.