pub struct ValidatorConfig {
pub min_trust_production: f32,
pub min_trust_research: f32,
pub max_content_bytes: usize,
pub check_injection: bool,
pub require_signature: bool,
pub signing_key: Vec<u8>,
pub ed25519_signing_key: Option<SigningKey>,
pub source_allowlist: AHashMap<Galaxy, Vec<String>>,
}Expand description
Configuration for the memory validator.
Fields§
§min_trust_production: f32Minimum trust score required to write to Production/Secure compartments.
min_trust_research: f32Minimum trust score required to write to Research/Sandbox compartments.
max_content_bytes: usizeMaximum content length in bytes.
check_injection: boolWhether to check for prompt injection patterns.
require_signature: boolWhether to require provenance signatures.
signing_key: Vec<u8>HMAC secret key for signing/verifying provenance.
ed25519_signing_key: Option<SigningKey>Optional Ed25519 signing key (PLAN_F F-2). When set, it takes
precedence over the HMAC key: signatures become ed25519:<hex>
and verification uses the matching public key.
source_allowlist: AHashMap<Galaxy, Vec<String>>Allowed sources for each galaxy (empty = allow all).
Implementations§
Source§impl ValidatorConfig
impl ValidatorConfig
Sourcepub fn with_signing_key(self, key: Vec<u8>) -> Self
pub fn with_signing_key(self, key: Vec<u8>) -> Self
Set the signing key for provenance HMAC.
Sourcepub fn with_ed25519_signing_key(self, key: SigningKey) -> Self
pub fn with_ed25519_signing_key(self, key: SigningKey) -> Self
Set an Ed25519 signing key (preferred over HMAC when present).
Sourcepub const fn require_signatures(self) -> Self
pub const fn require_signatures(self) -> Self
Enable provenance signature requirement.
Sourcepub fn allow_source(&mut self, galaxy: Galaxy, source: &str)
pub fn allow_source(&mut self, galaxy: Galaxy, source: &str)
Add a source to the allowlist for a galaxy.
Trait Implementations§
Source§impl Clone for ValidatorConfig
impl Clone for ValidatorConfig
Source§impl Debug for ValidatorConfig
impl Debug for ValidatorConfig
Auto Trait Implementations§
impl Freeze for ValidatorConfig
impl RefUnwindSafe for ValidatorConfig
impl Send for ValidatorConfig
impl Sync for ValidatorConfig
impl Unpin for ValidatorConfig
impl UnsafeUnpin for ValidatorConfig
impl UnwindSafe for ValidatorConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more