Skip to main content

Crate ai_model_vault

Crate ai_model_vault 

Source
Expand description

AI Model Vault - Universal secure vault for AI model formats

A cross-platform, XDG-compliant secure storage system for Neural and Neurosymbolic AI models with:

  • FIPS 140-3 compliant encryption
  • CVE scanning and compliance
  • MITRE ATT&CK framework alignment
  • CMMC 2.0 compliance
  • Version control with complete checkpoint history
  • Format conversion capabilities

Re-exportsยง

pub use config::VaultConfig;
pub use conversion::ConversionOptions;
pub use conversion::ConversionPipeline;
pub use conversion::ConversionProgress;
pub use conversion::ConversionResult;
pub use conversion::Converter;
pub use conversion::ValidationCheck;
pub use conversion::ValidationReport;
pub use crypto::streaming::decrypt_chunked;
pub use crypto::streaming::encrypt_chunked;
pub use crypto::streaming::is_chunked_format;
pub use crypto::streaming::StreamHeader;
pub use crypto::streaming::DEFAULT_CHUNK_SIZE;
pub use crypto::streaming::HEADER_SIZE;
pub use crypto::streaming::STREAM_MAGIC;
pub use crypto::streaming::STREAM_VERSION;
pub use error::ConversionError;
pub use error::CryptoError;
pub use error::Result;
pub use error::StorageError;
pub use error::VaultError;
pub use error::EXIT_AUTH;
pub use error::EXIT_COMPLIANCE;
pub use error::EXIT_CONFIG;
pub use error::EXIT_GENERAL;
pub use error::EXIT_INTEGRITY;
pub use error::EXIT_INVALID_INPUT;
pub use error::EXIT_NOT_FOUND;
pub use error::EXIT_PERMISSION;
pub use error::EXIT_SUCCESS;
pub use model_card::CaveatsAndRecommendations;
pub use model_card::EnvironmentalImpact;
pub use model_card::EthicalConsiderations;
pub use model_card::Evaluation;
pub use model_card::IntendedUse;
pub use model_card::Metric;
pub use model_card::ModelCard;
pub use model_card::ModelDetails;
pub use model_card::TrainingData;
pub use rag::Database;
pub use rag::Document;
pub use rag::DocumentStore;
pub use rag::InMemoryDatabase;
pub use rag::KnowledgeBase;
pub use rag::KnowledgeBaseConfig;
pub use rag::MCPServer;
pub use rag::MCPTool;
pub use rag::RetrievalCache;
pub use rag::Rule;
pub use rag::RuleAction;
pub use rag::RuleCondition;
pub use rag::RuleEngine;
pub use rag::ToolContext;
pub use rag::ToolExecutor;
pub use rag::ToolResult;
pub use traits::AimvUri;
pub use traits::AsyncBlobStore;
pub use traits::AsyncBlobStoreAdapter;
pub use traits::AuditLogSubscriber;
pub use traits::AuditSink;
pub use traits::BlobInfo;
pub use traits::BlobReceipt;
pub use traits::BlobStore;
pub use traits::BlobStoreStats;
pub use traits::CryptoProvider;
pub use traits::EventBus;
pub use traits::EventSubscriber;
pub use traits::MetricsSnapshot;
pub use traits::MetricsSubscriber;
pub use traits::NullAuditSink;
pub use traits::VaultEvent;
pub use traits::VaultMetrics;
pub use traits::VaultState;
pub use traits::VersionRepo;
pub use utils::CompressionAnalyzer;
pub use utils::CompressionReport;
pub use utils::ModelAnalysis;
pub use utils::ModelAnalyzer;
pub use utils::ModelArchive;
pub use utils::ModelDeduplicator;
pub use utils::ModelExporter;
pub use utils::PruningInfo;
pub use utils::PruningMethod;
pub use utils::QuantizationInfo;
pub use utils::QuantizationSavings;
pub use utils::RetrievalOptimizer;
pub use vault::Vault;
pub use vault::VaultBuilder;
pub use vault::VersionBackend;
pub use version::ModelVersion;
pub use version::VersionControl;
pub use version_sqlite::SqliteVersionRepo;
pub use benchmark::BenchmarkRecord;
pub use benchmark::BenchmarkResult;
pub use benchmark::BenchmarkStore;
pub use diff::DiffSummary;
pub use diff::ModelDiff;
pub use diff::ModelDiffer;
pub use diff::TensorChange;
pub use diff::TensorInfo;
pub use download::ModelDownloader;
pub use download::ModelSource;
pub use interop::register_lm_studio;
pub use interop::register_ollama;
pub use interop::InferenceEngine;
pub use interop::LmStudioOptions;
pub use interop::OllamaOptions;
pub use interop::RegistrationResult;
pub use license_scan::DetectedLicense;
pub use license_scan::LicenseClass;
pub use license_scan::LicenseScanReport;
pub use license_scan::LicenseScanner;
pub use license_scan::LicenseSource;
pub use scanning::PickleScanner;
pub use scanning::ScanFinding;
pub use scanning::ScanReport;
pub use scanning::Severity;
pub use signing::ModelSignature;
pub use signing::ModelSigner;
pub use signing::SignatureVerification;
pub use signing::SigningKeyPair;
pub use blockchain::AuditBlock;
pub use blockchain::AuditProof;
pub use blockchain::BlockchainAudit;
pub use blockchain::ChainVerification;
pub use blockchain::MerkleProof;
pub use blockchain::MerkleTree;
pub use blockchain::ProofVerification;
pub use federation::ConflictResolution;
pub use federation::FederationConfig;
pub use federation::FederationManager;
pub use federation::FederationStatus;
pub use federation::PeerConfig;
pub use federation::SyncConflict;
pub use federation::SyncManifest;
pub use federation::SyncResult;
pub use federation::VectorClock;
pub use access_control::AclEntry;
pub use access_control::AclGuard;
pub use access_control::Role;
pub use gc::GcReport;
pub use kms::is_kms_uri;
pub use kms::KmsBackend;
pub use kms::KmsRequest;
pub use kms::KmsUri;
pub use lineage_graph::DerivationKind;
pub use lineage_graph::LineageEdge;
pub use lineage_graph::LineageGraph;
pub use plugins::PluginInfo;
pub use plugins::PluginManifest;
pub use plugins::PluginRegistry;
pub use policies::PolicyReport;
pub use policies::PolicyStore;
pub use policies::RetentionPolicy;
pub use profiles::Profile;
pub use profiles::ProfileStore;
pub use tags::SearchQuery;
pub use tags::SearchResult;
pub use tags::TagStore;
pub use validation::ValidationProbe;
pub use validation::ValidationResult;
pub use validation::ValidationStore;
pub use vault_bundle::BundleManifest;
pub use vault_bundle::ExportReport;
pub use vault_bundle::ImportReport;
pub use webhooks::WebhookPayload;
pub use webhooks::WebhookStore;
pub use webhooks::WebhookTarget;
pub use quantization::BatchQuantReport;
pub use quantization::QuantMethod;
pub use quantization::QuantProfile;
pub use quantization::QuantProfileStore;
pub use quantization::QuantResult;
pub use evaluation::EvalComparison;
pub use evaluation::EvalRun;
pub use evaluation::EvalStore;
pub use evaluation::MetricDelta;
pub use evaluation::MetricResult;
pub use scheduler::BackupFrequency;
pub use scheduler::BackupManager;
pub use scheduler::BackupRecord;
pub use scheduler::BackupReport;
pub use scheduler::BackupSchedule;
pub use multi_vault::VaultEntry;
pub use multi_vault::VaultRegistry;
pub use multi_vault::VaultSummary;

Modulesยง

access_control
Access control โ€” role-based permissions for multi-user vaults.
api
REST API server for AI Model Vault
audit
Audit logging for compliance and security monitoring
benchmark
Benchmark metadata โ€” attach evaluation results to model versions.
blockchain
Blockchain-based immutable audit trail
cloud_envelope
Client-side encryption for objects leaving the machine.
compliance
Compliance checking and security validation
config
XDG Base Directory Specification compliant configuration
conversion
Model format conversion pipeline
crypto
FIPS 140-3 Compliant Cryptographic Module
diff
Model diffing โ€” compare two versions of a model.
download
Model download from trusted sources.
error
Error types for AI Model Vault
evaluation
Model evaluation harness.
federation
Federated vault synchronization
federation_transport
Shared plumbing for the federation client and server halves.
formats
Model format detection and conversion registry
gc
Garbage collection โ€” find and remove orphaned blobs, temp files, and unreferenced data inside a vault directory.
gguf
Minimal GGUF header reader.
interop
Inference engine interop โ€” register vault models with Ollama and LM Studio.
kms
Secrets manager integration โ€” derive vault passphrases from external KMS.
license_scan
License scanning โ€” detect model licenses from metadata and model cards.
lineage_graph
Cross-model lineage graph โ€” track derivation relationships between different models (fine-tunes, merges, distillations, quantisations).
model_card
Model Card implementation following industry standards
multi_vault
Multi-vault management.
permissions
Cross-platform file permission utilities.
plugins
Plugin system โ€” dynamic extension loading for custom commands and hooks.
policies
Snapshot / retention policies โ€” automated version cleanup rules.
profiles
Configuration profiles โ€” named sets of config overrides.
quantization
Model quantization pipeline.
rag
RAG (Retrieval-Augmented Generation) and Rule-Based System Support
scanning
Pickle safety scanner for PyTorch model files.
scheduler
Vault backup scheduling.
signing
Ed25519 model signing and provenance verification.
storage
Storage backend for encrypted model data
tags
Model tagging and search โ€” attach tags and query models by metadata.
telemetry
Telemetry and analytics module for AI Model Vault.
telemetry_otlp
OTLP export transport for telemetry events. OTLP export for telemetry events (otel feature).
traits
Core trait definitions for AI Model Vault architecture v2.
tui
Terminal UI โ€” interactive model browser for the vault.
utils
AI Model Utilities - Common operations for AI models
validation
Model inference validation โ€” sanity-check model outputs after storage or conversion to catch silent corruption.
vault
Main Vault implementation
vault_bundle
Vault export/import โ€” portable encrypted vault bundles.
version
Version control system for model checkpoints
version_sqlite
SQLite-backed version repository.
webhooks
Webhook / notification system โ€” fire HTTP callbacks on vault events.

Constantsยง

VERSION
Library version