pub struct PortRegistry {Show 16 fields
pub state: Arc<dyn StateStore>,
pub config: Arc<dyn ConfigStore>,
pub auth: Arc<dyn AuthProvider>,
pub event_bus: Arc<dyn EventBus>,
pub skills: Arc<dyn SkillLoader>,
pub personas: Arc<dyn PersonaProvider>,
pub access: Arc<dyn AccessGate>,
pub capabilities: Arc<dyn CapabilityResolver>,
pub memory: Arc<dyn MemoryStore>,
pub cron: Arc<dyn CronScheduler>,
pub resources: Arc<dyn ResourceMonitor>,
pub catalog: Arc<dyn ModelCatalog>,
pub url_router: Arc<dyn InternalUrlRouter>,
pub rules: Arc<dyn RuleRegistry>,
pub embeddings: Arc<dyn EmbeddingProvider>,
pub hooks: Arc<dyn HookRunner>,
}Expand description
Bundle of all registered ports. Products construct this and pass it to
OxicodeBuilder::with_ports(...).
All fields default to noop impls so products can register only the ports they care about.
Fields§
§state: Arc<dyn StateStore>State store.
config: Arc<dyn ConfigStore>Config store.
auth: Arc<dyn AuthProvider>Auth provider.
event_bus: Arc<dyn EventBus>Event bus.
skills: Arc<dyn SkillLoader>Skill loader.
personas: Arc<dyn PersonaProvider>Persona provider.
access: Arc<dyn AccessGate>Access gate.
capabilities: Arc<dyn CapabilityResolver>Capability resolver.
memory: Arc<dyn MemoryStore>Memory store.
cron: Arc<dyn CronScheduler>Cron scheduler.
resources: Arc<dyn ResourceMonitor>Resource monitor.
catalog: Arc<dyn ModelCatalog>Model catalog — provider/model metadata source of truth.
Default: catalog::NoopModelCatalog (empty results).
url_router: Arc<dyn InternalUrlRouter>Internal URL router — protocol-scheme dispatch.
Default: NoopInternalUrlRouter.
rules: Arc<dyn RuleRegistry>Rule registry — TTSR rules.
Default: NoopRuleRegistry.
embeddings: Arc<dyn EmbeddingProvider>Embedding provider — text→vector for semantic search.
Default: NoopEmbeddingProvider.
hooks: Arc<dyn HookRunner>Hook runner — user-configurable event→shell-command hooks.
Default: NoopHookRunner.
Implementations§
Source§impl PortRegistry
impl PortRegistry
Sourcepub fn noop() -> Self
pub fn noop() -> Self
All-noop registry. Useful for tests and products that only need agent execution without any persistence.
Sourcepub async fn from_directory(_dir: &Path) -> Self
pub async fn from_directory(_dir: &Path) -> Self
Build a registry from a directory for file-based persistence.
Convenience for the common case of “give me a registry backed by
~/.oxicode” — products can also construct PortRegistry field-by-field.
This is a free function: it requires concrete impls from a separate
adapter crate (e.g. oxicode-fs). When no adapter is available, this
returns PortRegistry::noop().
Trait Implementations§
Source§impl Clone for PortRegistry
impl Clone for PortRegistry
Source§fn clone(&self) -> PortRegistry
fn clone(&self) -> PortRegistry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more