Expand description
WeftOS kernel layer for clawft.
This crate provides the kernel abstraction layer that sits between
the CLI/API surface and clawft-core. It introduces:
- Boot sequence (
boot::Kernel) – lifecycle management wrappingAppContextwith structured startup/shutdown. - Process table (
process::ProcessTable) – PID-based agent tracking with state machine transitions. - Service registry (
service::ServiceRegistry) – named service lifecycle with health checks. - IPC (
ipc::KernelIpc) – typed message envelopes over the existingMessageBus. - Capabilities (
capability::AgentCapabilities) – permission model for agent processes. - Health monitoring (
health::HealthSystem) – aggregated health checks across all services. - Console (
console) – boot event types and output formatting for the interactive kernel terminal. - Configuration (
config::KernelConfig) – kernel-specific settings embedded in the root config. - Containers (
container::ContainerManager) – sidecar container lifecycle and health integration. - Applications (
app::AppManager) – application manifest parsing, validation, and lifecycle state machine. - Cluster (
cluster::ClusterMembership) – multi-node cluster membership, peer tracking, and health. - Environments (
environment::EnvironmentManager) – governance-scoped dev/staging/prod environments. - Governance (
governance::GovernanceEngine) – three-branch constitutional governance with effect algebra scoring. - Agency (
agency::Agency) – agent-first architecture with roles, spawn permissions, and agent manifests.
§Feature Flags
native(default) – enables tokio runtime, native file I/O.mesh(default) – mesh transport, framing, IPC (JSON KernelMessage).mesh-rvf– experimental RVF IPC encoding API surface (ADR-031 / WEFT-683); encode/decode currently returnUnsupportedEncoding.wasm-sandbox– enables WASM tool runner (Phase K3).containers– enables container manager (Phase K4).ecc– enables ECC cognitive substrate (Phase K3c).
§Crate Ecosystem
WeftOS is built from these crates:
| Crate | Role |
|---|---|
weftos | Product facade – re-exports kernel, core, types |
clawft-kernel | Kernel: processes, services, governance, mesh, ExoChain |
clawft-core | Agent framework: pipeline, context, tools, skills |
clawft-types | Shared type definitions |
clawft-platform | Platform abstraction (native/WASM/browser) |
clawft-plugin | Plugin SDK for tools, channels, and extensions |
clawft-llm | LLM provider abstraction (11 providers + local) |
exo-resource-tree | Hierarchical resource namespace with Merkle integrity |
Re-exports§
pub use a2a::A2ARouter;pub use agency::Agency;pub use agency::AgentHealth;pub use agency::AgentInterface;pub use agency::AgentManifest;pub use agency::AgentPriority;pub use agency::AgentResources;pub use agency::AgentRestartPolicy;pub use agency::AgentRole;pub use agency::InterfaceProtocol;pub use agency::ResponseMode;pub use agent_registry::AgentRegistry;pub use agent_registry::RegisteredAgent;pub use agent_registry::publish_payload;pub use agent_registry::register_payload;pub use agent_registry::subscribe_payload;pub use app::AgentSpec;pub use app::AppCapabilities;pub use app::AppError;pub use app::AppHooks;pub use app::AppManager;pub use app::AppManifest;pub use app::AppState;pub use app::AppsFile;pub use app::InstalledApp;pub use app::ServiceSpec;pub use app::ToolSource;pub use app::ToolSpec;pub use artifact_store::ArtifactBackend;pub use artifact_store::ArtifactStore;pub use artifact_store::ArtifactType;pub use artifact_store::StoredArtifact;pub use assessment::AnalysisContext;pub use assessment::Analyzer;pub use assessment::AnalyzerRegistry;pub use assessment::AssessmentDiff;pub use assessment::AssessmentReport;pub use assessment::AssessmentService;pub use assessment::AssessmentSummary;pub use assessment::ComparisonReport;pub use assessment::Finding;pub use assessment::PeerInfo as AssessmentPeerInfo;pub use auth_service::AuditEntry;pub use auth_service::AuthService;pub use auth_service::AuthToken;pub use auth_service::CredentialGrant;pub use auth_service::CredentialRequest;pub use auth_service::CredentialType;pub use auth_service::HashedCredential;pub use auth_service::IssuedToken;pub use auth_service::StoredCredential as AuthStoredCredential;pub use boot::Kernel;pub use boot::KernelState;pub use calibration::EccCalibration;pub use calibration::EccCalibrationConfig;pub use capability::AgentCapabilities;pub use capability::CapabilityChecker;pub use capability::CapabilityElevationRequest;pub use capability::ElevationResult;pub use capability::IpcScope;pub use capability::ResourceLimits;pub use capability::ResourceType;pub use capability::SandboxPolicy;pub use capability::ToolPermissions;pub use capability_claim::CAPABILITY_ALLOWLIST;pub use capability_claim::CapabilityClaim;pub use capability_claim::CapabilityClaimError;pub use capability_claim::SignedCapabilityAdvertisement;pub use capability_claim::validate_capabilities;pub use capability_claim::validate_capability;pub use capability_claim::apply_verified_capabilities;pub use capability_claim::sign_claim;pub use capability_claim::verify_signed_advertisement;pub use causal::CausalEdge;pub use causal::CausalEdgeType;pub use causal::CausalGraph;pub use causal::CausalNode;pub use causal::ChangeEvent;pub use causal::ChangePrediction;pub use causal::CouplingPair;pub use causal::SPECTRAL_EML_MIN_NODES;pub use causal::SPECTRAL_RFF_MIN_NODES;pub use causal::SpectralMethod;pub use causal::SpectralResult;pub use causal::select_spectral_method;pub use ecc_segment::CalibrationProfileSegment;pub use ecc_segment::EccSegment;pub use ecc_segment::EccSegmentCodec;pub use ecc_segment::EccSegmentError;pub use ecc_segment::EccSegmentType;pub use ecc_segment::SpectralCheckpoint;pub use ecc_segment::decode_ecc_segment;pub use ecc_segment::encode_ecc_segment;pub use ecc_segment::segment_from_wire;pub use ecc_segment::segment_to_wire;pub use lewm_invariant::DecouplingRule;pub use lewm_invariant::InvariantCheck;pub use lewm_invariant::WmWriteKind;pub use lewm_invariant::WorldModelFacade;pub use lewm_invariant::check_wm_write;pub use lewm_invariant::local_ecc_sufficient_without_wm;pub use causal_predict::CausalCollapseModel;pub use causal_predict::CausalRankRequest;pub use causal_predict::CausalRankResponse;pub use causal_predict::CoherenceTracker;pub use causal_predict::CollapseFeatures;pub use causal_predict::ConversationState;pub use causal_predict::EvidenceRanking;pub use causal_predict::detect_conversation_cycle;pub use causal_predict::predict_delta_lambda2;pub use causal_predict::rank_evidence_by_impact;pub use chain::AnchorReceipt;pub use chain::AppendSignedError;pub use chain::ChainAnchor;pub use chain::ChainCheckpoint;pub use chain::ChainEvent;pub use chain::ChainLoggable;pub use chain::ChainManager;pub use chain::ChainStatus;pub use chain::ChainVerifyResult;pub use chain::CustodyAttestation;pub use chain::GovernanceDecisionEvent;pub use chain::IpcDeadLetterEvent;pub use chain::MockAnchor;pub use chain::RestartEvent;pub use key_rotation::DEFAULT_GRACE_PERIOD_SECS;pub use key_rotation::KIND_KEY_ROTATION;pub use key_rotation::SOURCE_IDENTITY;pub use key_rotation::KeyRotationError;pub use key_rotation::KeyRotationPayload;pub use key_rotation::KeyRotationVerifier;pub use key_rotation::build_key_rotation_payload;pub use key_rotation::format_rotation_summary;pub use key_rotation::rotate_chain_signing_key;pub use key_rotation::rotate_chain_signing_key_now;pub use key_rotation::verify_key_rotation_event;pub use key_rotation::verify_key_rotation_payload;pub use chain_anchor::AnchorFrequencyPolicy;pub use chain_anchor::AnchoringController;pub use chain_anchor::ExternalIntentEntry;pub use chain_anchor::ExternalLedgerAnchor;pub use chain_anchor::FileLedgerAnchor;pub use chain_anchor::FileLedgerEntry;pub use cluster::ClusterService;pub use cluster::NodeEccCapability;pub use cluster::NodeIdentity;pub use cluster::ClusterConfig;pub use cluster::ClusterError;pub use cluster::ClusterMembership;pub use cluster::NodeId;pub use cluster::NodePlatform;pub use cluster::NodeState;pub use cluster::PairedHost;pub use cluster::PairedHostsFile;pub use cluster::PairingGate;pub use cluster::PairingWindowResult;pub use cluster::PeerNode;pub use cognitive_tick::CognitiveTick;pub use cognitive_tick::CognitiveTickConfig;pub use cognitive_tick::CognitiveTickStats;pub use coherence::CoherenceBand;pub use coherence::CoherenceDampener;pub use coherence::CoherenceSignals;pub use coherence::DAMPEN_FACTOR;pub use coherence::compute_coherence;pub use config::KernelConfigExt;pub use config_service::ConfigChange;pub use config_service::ConfigEntry;pub use config_service::ConfigService;pub use config_service::ConfigValue;pub use config_service::SecretRef;pub use console::BootEvent;pub use console::BootLog;pub use console::BootPhase;pub use console::KernelEventLog;pub use console::LogLevel;pub use container::ContainerConfig;pub use container::ContainerError;pub use container::ContainerManager;pub use container::ContainerService;pub use container::ContainerState;pub use container::ManagedContainer;pub use container::PortMapping;pub use container::RestartPolicy;pub use container::VolumeMount;pub use cron::CronError;pub use cron::CronService;pub use crossref::CrossRef;pub use crossref::CrossRefStore;pub use crossref::CrossRefType;pub use crossref::StructureTag;pub use crossref::UniversalNodeId;pub use democritus::DemocritusConfig;pub use democritus::DemocritusLoop;pub use democritus::DemocritusTickResult;pub use embedding::EmbeddingError;pub use embedding::EmbeddingProvider;pub use embedding::LlmEmbeddingConfig;pub use embedding::LlmEmbeddingProvider;pub use embedding::MockEmbeddingProvider;pub use embedding::select_embedding_provider;pub use embedding_e5::E5EmbeddingProvider;pub use embedding_e5::E5_DIMS;pub use embedding_e5::E5_MAX_TOKENS;pub use embedding_e5::E5_MODEL_NAME;pub use embedding_e5::PASSAGE_PREFIX;pub use embedding_e5::QUERY_PREFIX;pub use embedding_onnx::AstEmbeddingProvider;pub use embedding_onnx::OnnxEmbeddingProvider;pub use embedding_onnx::RustCodeFeatures;pub use embedding_onnx::SentenceTransformerProvider;pub use embedding_onnx::extract_rust_features;pub use embedding_onnx::preprocess_markdown;pub use embedding_onnx::split_sentences;pub use environment::AuditLevel;pub use environment::Environment;pub use environment::EnvironmentClass;pub use environment::EnvironmentError;pub use environment::EnvironmentManager;pub use environment::GovernanceBranches;pub use environment::GovernanceScope;pub use environment::LearningMode;pub use duplex::DuplexChannel;pub use duplex::DuplexImpulse;pub use duplex::DuplexState;pub use duplex::EdgeCommand;pub use duplex::FloorVerdict;pub use duplex::MediaPayload;pub use duplex::PayloadKind;pub use duplex::StreamObservation;pub use thin_edge::ControlMessage;pub use thin_edge::EdgeReflexShadow;pub use thin_edge::EdgeState;pub use thin_edge::LocalhostDuplexSession;pub use thin_edge::MediaFrame;pub use thin_edge::ObserveOutcome;pub use thin_edge::ThinEdge;pub use causal_state_fold::NodeStateTransition;pub use causal_state_fold::fold_node_states;pub use causal_state_fold::fold_node_states_from_chain;pub use causal_state_fold::fold_node_states_until;pub use error::KernelError;pub use error::KernelResult;pub use floor::ContentReadiness;pub use floor::ERL_BARGE_FLOOR;pub use floor::ERL_BARGE_HYSTERESIS;pub use floor::ErlBargeConfig;pub use floor::ErlBargeGate;pub use floor::FloorCandidate;pub use floor::FloorDecision;pub use floor::FloorState;pub use floor::UrgencySignals;pub use floor::compute_urgency;pub use floor::contending_count;pub use floor::crowd_density;pub use floor::erl_admits_barge;pub use floor::erl_admits_barge_opt;pub use floor::evaluate_floor;pub use floor::floor_verdict_from_erl;pub use floor::floor_verdict_from_erl_config;pub use gate::CapabilityGate;pub use gate::GateBackend;pub use gate::GateDecision;pub use gate::GovernanceGate;pub use governance::EffectVector;pub use governance::GateEffectKind;pub use governance::GatePrincipal;pub use governance::GovernanceBranch;pub use governance::GovernanceDecision;pub use governance::GovernanceEngine;pub use governance::GovernanceRequest;pub use governance::GovernanceResult;pub use governance::GovernanceRule;pub use governance::GovernanceRuleType;pub use governance::RuleSeverity;pub use governance::selector_matches;pub use governance::with_effect_context;pub use rule_distribution::EscalationOutcome;pub use rule_distribution::EscalationRecord;pub use rule_distribution::RuleDistribution;pub use rule_distribution::RuleGossipEnvelope;pub use rule_distribution::VersionedRule;pub use health::HealthStatus;pub use health::HealthSystem;pub use health::OverallHealth;pub use health::ProbeConfig;pub use health::ProbeResult;pub use health::ProbeState;pub use hnsw_eml::ArmMetrics;pub use hnsw_eml::DistanceTrainingPoint;pub use hnsw_eml::EfPrediction;pub use hnsw_eml::EfStrategy;pub use hnsw_eml::EfTrainingPoint;pub use hnsw_eml::HnswBenchmarkParams;pub use hnsw_eml::HnswEmlBenchmark;pub use hnsw_eml::HnswEmlConfig;pub use hnsw_eml::HnswEmlManager;pub use hnsw_eml::HnswEmlStatus;pub use hnsw_eml::HnswScalingPoint;pub use hnsw_eml::PathPredictBenchmark;pub use hnsw_eml::PathPrediction;pub use hnsw_eml::PathTrainingPoint;pub use hnsw_eml::ProbeReport;pub use hnsw_eml::RebuildPrediction;pub use hnsw_eml::RebuildTrainingPoint;pub use hnsw_eml::SearchStrategy;pub use hnsw_eml::SpectrumForm;pub use hnsw_eml::TriageRecord;pub use hnsw_eml::probe_corpus;pub use hnsw_eml::run_hnsw_benchmark;pub use hnsw_eml::run_hnsw_benchmark_with;pub use hnsw_eml::run_path_predict_benchmark;pub use hnsw_eml::triage_strategy;pub use hnsw_service::HnswSearchResult;pub use hnsw_service::HnswService;pub use hnsw_service::HnswServiceConfig;pub use hnsw_service::MultiKey;pub use hnsw_service::MultiKeyConfig;pub use hnsw_service::RELATIONSHIP_HNSW_PREFIX;pub use hnsw_service::entity_search_keys;pub use hnsw_service::relationship_hnsw_id;pub use hnsw_service::relationship_search_keys;pub use impulse::ImpulseQueue;pub use impulse::ImpulseType;pub use ipc::CompositePid;pub use ipc::ExitReason as SignalExitReason;pub use ipc::GlobalPid;pub use ipc::KernelIpc;pub use ipc::KernelMessage;pub use ipc::KernelSignal;pub use ipc::MeshNodeId;pub use ipc::MessagePayload;pub use ipc::MessageTarget;pub use ipc::ProcessDown as SignalProcessDown;pub use mesh::MAX_MESSAGE_SIZE;pub use mesh::MeshError;pub use mesh::MeshPeer;pub use mesh::MeshStream;pub use mesh::MeshTransport;pub use mesh::TransportListener;pub use mesh::WeftHandshake;pub use mesh_clock::Clock;pub use mesh_clock::MockClock;pub use mesh_clock::MonoTime;pub use mesh_clock::RealClock;pub use mesh_artifact::ArtifactExchange;pub use mesh_artifact::ExchangeConfig;pub use mesh_artifact::ExchangeError;pub use mesh_artifact_pkg::ExchangedPackage;pub use mesh_artifact_pkg::PackageExchangeError;pub use mesh_artifact_transfer::FetchError;pub use mesh_artifact_transfer::FetchOutcome;pub use mesh_artifact_transfer::PeerLink;pub use mesh_artifact_transfer::PeerSet;pub use mesh_artifact_transfer::PieceScheduler;pub use mesh_artifact_transfer::SequentialScheduler;pub use mesh_artifact_transfer::ServeStats;pub use mesh_artifact_wire::ArtifactDescriptor;pub use mesh_artifact_wire::ArtifactId;pub use mesh_artifact_wire::ArtifactKey;pub use mesh_artifact_wire::ArtifactMsg;pub use mesh_artifact_wire::Bitfield;pub use mesh_artifact_wire::WireError;pub use mesh_assess::AssessmentEnvelope;pub use mesh_assess::AssessmentTransport;pub use mesh_bootstrap::BootstrapDiscovery;pub use mesh_bootstrap::PeerExchangeDiscovery;pub use mesh_chain::ChainBridgeEvent;pub use mesh_chain::ChainForkStatus;pub use mesh_chain::ChainSyncRequest;pub use mesh_chain::ChainSyncResponse;pub use mesh_chain::SyncStateDigest;pub use mesh_dedup::DedupFilter;pub use mesh_discovery::DiscoveredPeer;pub use mesh_discovery::DiscoveryBackend;pub use mesh_discovery::DiscoveryCoordinator;pub use mesh_discovery::DiscoveryError;pub use mesh_discovery::DiscoverySource;pub use mesh_discovery::MeshPeerEvent;pub use mesh_discovery::MeshPeerEventBus;pub use mesh_framing::Frame;pub use mesh_framing::FrameType;pub use mesh_framing::MeshFrame;pub use mesh_framing::MsgType;pub use mesh_heartbeat::HeartbeatConfig;pub use mesh_heartbeat::HeartbeatState;pub use mesh_heartbeat::HeartbeatTracker;pub use mesh_heartbeat::PeerHeartbeat;pub use mesh_heartbeat::PingRequest;pub use mesh_heartbeat::PingResponse;pub use mesh_ipc::MeshIpcEnvelope;pub use mesh_ipc::MeshIpcError;pub use mesh_ipc::Scope as MeshScope;pub use mesh_delivery::LocalDelivery;pub use mesh_mode::MeshMode;pub use mesh_kad::ALPHA;pub use mesh_kad::DhtEntry;pub use mesh_kad::DhtKey;pub use mesh_kad::K_BUCKET_SIZE;pub use mesh_kad::KEY_BITS;pub use mesh_kad::KademliaDiscovery;pub use mesh_kad::KademliaTable;pub use mesh_kad::NamespacedDhtKey;pub use mesh_kad::bucket_index;pub use mesh_kad::leading_zeros;pub use mesh_kad::xor_distance;pub use mesh_listener::JoinRequest;pub use mesh_listener::JoinResponse;pub use mesh_listener::MeshConnectionPool;pub use mesh_listener::PeerInfo;pub use mesh_log::LogAggregator;pub use mesh_log::LogQuery as MeshLogQuery;pub use mesh_log::RemoteLogEntry;pub use mesh_mdns::MdnsAnnouncement;pub use mesh_mdns::MdnsDiscovery;pub use mesh_mdns::WEFTOS_SERVICE_NAME;pub use mesh_noise::EncryptedChannel;pub use mesh_noise::EncryptedPeer;pub use mesh_noise::NoiseConfig;pub use mesh_noise::NoisePattern;pub use mesh_process::ConsensusEntry;pub use mesh_process::ConsensusOp;pub use mesh_process::ConsensusRole;pub use mesh_process::ConsistentHashRing;pub use mesh_process::CrdtGossipState;pub use mesh_process::DistributedProcessTable;pub use mesh_process::MetadataConsensus;pub use mesh_process::ProcessAdvertisement;pub use mesh_process::ProcessStatus;pub use mesh_process::ResourceSummary;pub use mesh_runtime::DiscoveryState;pub use mesh_runtime::MeshRuntime;pub use mesh_runtime::PeerConnection;pub use mesh_service::RemoteServiceEndpoint;pub use mesh_service::ServiceResolutionCache;pub use mesh_service::ServiceResolveRequest;pub use mesh_service::ServiceResolveResponse;pub use mesh_system_service::MeshService;pub use mesh_service_adv::ClusterServiceRegistry;pub use mesh_service_adv::ServiceAdvertisement;pub use mesh_tcp::TcpTransport;pub use mesh_tree::MerkleProof;pub use mesh_tree::TreeDiffType;pub use mesh_tree::TreeNodeDiff;pub use mesh_tree::TreeSyncAction;pub use mesh_tree::TreeSyncRequest;pub use mesh_tree::TreeSyncResponse;pub use mesh_ws::WsTransport;pub use mesh_quic::QuicTransport;pub use monitor::ExitReason;pub use monitor::MonitorRegistry;pub use monitor::ProcessDown;pub use monitor::ProcessLink;pub use monitor::ProcessMonitor;pub use node_registry::DerivedGrantError;pub use node_registry::DerivedWriteGrant;pub use node_registry::GrantScope;pub use node_registry::MESH_CANONICAL_PREFIX;pub use node_registry::NodeRegistry;pub use node_registry::RegisteredNode;pub use node_registry::node_publish_payload;pub use node_registry::path_belongs_to;pub use node_registry::required_path_prefix;pub use node_id::is_node_id;pub use node_id::node_id_from_pubkey;pub use node_key::NODE_KEY_FILE;pub use node_key::NodeKeyError;pub use node_key::load_or_generate_key_file;pub use node_key::load_or_generate_node_key;pub use persistence::PersistenceConfig;pub use process::Pid;pub use process::ProcessEntry;pub use process::ProcessState;pub use process::ProcessTable;pub use process::ResourceUsage;pub use profile_store::ProfileEntry;pub use profile_store::ProfileError;pub use profile_store::ProfileMeta;pub use profile_store::ProfileStore;pub use quantum_backend::BackendStatus;pub use quantum_backend::EvolutionParams;pub use quantum_backend::JobHandle;pub use quantum_backend::JobStatus;pub use quantum_backend::QuantumBackend;pub use quantum_backend::QuantumError;pub use quantum_backend::QuantumResults;pub use quantum_braket::BraketBackend;pub use quantum_braket::BraketConfig;pub use quantum_braket::BraketDevice;pub use quantum_pasqal::PasqalBackend;pub use quantum_pasqal::PasqalConfig;pub use quantum_pasqal::PasqalDevice;pub use quantum_register::LayoutMethod;pub use quantum_register::RegisterConstraints;pub use quantum_register::build_register;pub use quantum_register::build_register_with;pub use quantum_state::Complex;pub use quantum_state::Hypothesis;pub use quantum_state::HypothesisSuperposition;pub use quantum_state::QuantumCognitiveState;pub use quantum_state::QuantumEvidenceRanking;pub use reconciler::DesiredAgentState;pub use reconciler::DriftEvent;pub use reconciler::ReconciliationController;pub use revocation::RevocationError;pub use revocation::RevocationKind;pub use revocation::RevocationList;pub use revocation::RevokedHost;pub use revocation::RevokedSubject;pub use service::KernelServiceApi;pub use service::McpAdapter;pub use service::ServiceApi;pub use service::ServiceAuditLevel;pub use service::ServiceContract;pub use service::ServiceEndpoint;pub use service::ServiceEntry;pub use service::ServiceInfo;pub use service::ServiceRegistry;pub use service::ServiceType;pub use service::ShellAdapter;pub use service::SystemService;pub use stream_anchor::StreamWindowAnchor;pub use stream_anchor::TopicAnchor;pub use stream_anchor::topic_matches;pub use substrate_service::AclDenialEvent;pub use substrate_service::EgressDenied;pub use substrate_service::GateDenied;pub use substrate_service::Sensitivity as SubstrateSensitivity;pub use substrate_service::SubstrateListEntry;pub use substrate_service::SubstrateListSnapshot;pub use substrate_service::SubstrateReadSnapshot;pub use substrate_service::SubstrateService;pub use supervisor::AgentSupervisor;pub use supervisor::EnclaveConfig;pub use supervisor::SpawnBackend;pub use supervisor::SpawnRequest;pub use supervisor::SpawnResult;pub use supervisor::ResourceCheckResult;pub use supervisor::RestartBudget;pub use supervisor::RestartStrategy;pub use supervisor::RestartTracker;pub use supervisor::check_resource_usage;pub use talk_loop::TalkModeConfig;pub use talk_loop::TalkModeLoop;pub use talk_loop::TalkTickResult;pub use tree_manager::TreeManager;pub use tree_manager::TreeStats;pub use tree_view::AgentTreeView;pub use tree_view::TreeScope;pub use vector_backend::SearchResult as VectorSearchResult;pub use vector_backend::VectorBackend;pub use vector_backend::VectorBackendKind;pub use vector_backend::VectorError;pub use vector_backend::VectorResult;pub use vector_diskann::DiskAnnBackend;pub use vector_diskann::DiskAnnConfig;pub use vector_hnsw::HnswBackend;pub use vector_hybrid::EvictionPolicy;pub use vector_hybrid::HybridBackend;pub use vector_hybrid::HybridConfig;pub use view_resolver::SingleViewResolver;pub use view_resolver::ViewResolver;pub use weaver::ConfidenceGap;pub use weaver::ConfidenceReport;pub use weaver::DataSource;pub use weaver::ExportedModel;pub use weaver::IngestResult;pub use weaver::MetaDecisionType;pub use weaver::MetaLoomEvent;pub use weaver::ModelingSession;pub use weaver::ModelingSuggestion;pub use weaver::StrategyPattern;pub use weaver::TickResult;pub use weaver::WeaverCommand;pub use weaver::WeaverEngine;pub use weaver::WeaverError;pub use weaver::WeaverKnowledgeBase;pub use weaver::WeaverResponse;pub use dead_letter::DeadLetter;pub use dead_letter::DeadLetterQueue;pub use dead_letter::DeadLetterReason;pub use log_service::LogEntry;pub use log_service::LogQuery;pub use log_service::LogService;pub use metrics::Histogram;pub use metrics::METRIC_ACTIVE_AGENTS;pub use metrics::METRIC_ACTIVE_SERVICES;pub use metrics::METRIC_AGENT_CRASHES;pub use metrics::METRIC_AGENT_SPAWNS;pub use metrics::METRIC_CHAIN_LENGTH;pub use metrics::METRIC_GOVERNANCE_EVAL_MS;pub use metrics::METRIC_IPC_LATENCY_MS;pub use metrics::METRIC_MESSAGES_DELIVERED;pub use metrics::METRIC_MESSAGES_DROPPED;pub use metrics::METRIC_MESSAGES_SENT;pub use metrics::METRIC_TOOL_EXECUTION_MS;pub use metrics::METRIC_TOOL_EXECUTIONS;pub use metrics::MetricSnapshot;pub use metrics::MetricsRegistry;pub use named_pipe::NamedPipe;pub use named_pipe::NamedPipeRegistry;pub use named_pipe::PipeInfo;pub use reliable_queue::DeliveryResult;pub use reliable_queue::PendingDelivery;pub use reliable_queue::ReliableConfig;pub use reliable_queue::ReliableQueue;pub use timer::TimerEntry;pub use timer::TimerInfo;pub use timer::TimerService;pub use topic::SubscriberId;pub use topic::SubscriberSink;pub use topic::Subscription;pub use topic::TopicRouter;pub use wasm_runner::AgentSendTool;pub use wasm_runner::AgentInspectTool;pub use wasm_runner::AgentListTool;pub use wasm_runner::AgentResumeTool;pub use wasm_runner::AgentSpawnTool;pub use wasm_runner::AgentStopTool;pub use wasm_runner::AgentSuspendTool;pub use wasm_runner::BackendSelection;pub use wasm_runner::BuiltinTool;pub use wasm_runner::BuiltinToolSpec;pub use wasm_runner::Certificate;pub use wasm_runner::CompiledModuleCache;pub use wasm_runner::DeployedTool;pub use wasm_runner::FsCopyTool;pub use wasm_runner::FsCreateDirTool;pub use wasm_runner::FsExistsTool;pub use wasm_runner::FsGlobTool;pub use wasm_runner::FsMoveTool;pub use wasm_runner::FsReadDirTool;pub use wasm_runner::FsReadFileTool;pub use wasm_runner::FsRemoveTool;pub use wasm_runner::FsStatTool;pub use wasm_runner::FsWriteFileTool;pub use wasm_runner::IpcSendTool;pub use wasm_runner::IpcSubscribeTool;pub use wasm_runner::SandboxConfig;pub use wasm_runner::ShellPipeline;pub use wasm_runner::SysCronAddTool;pub use wasm_runner::SysCronListTool;pub use wasm_runner::SysCronRemoveTool;pub use wasm_runner::SysEnvGetTool;pub use wasm_runner::SysServiceHealthTool;pub use wasm_runner::SysServiceListTool;pub use wasm_runner::ToolCategory;pub use wasm_runner::ToolError;pub use wasm_runner::ToolRegistry;pub use wasm_runner::ToolSigningAuthority;pub use wasm_runner::ToolVersion;pub use wasm_runner::WasiFsScope;pub use wasm_runner::WasmError;pub use wasm_runner::WasmSandboxConfig;pub use wasm_runner::WasmTool;pub use wasm_runner::WasmToolResult;pub use wasm_runner::WasmToolRunner;pub use wasm_runner::WasmValidation;pub use wasm_runner::builtin_tool_catalog;pub use wasm_runner::compute_module_hash;pub use wasm_runner::verify_tool_signature;pub use wasm_runner::SysChainQueryTool;pub use wasm_runner::SysChainStatusTool;pub use wasm_runner::SysTreeInspectTool;pub use wasm_runner::SysTreeReadTool;
Modules§
- a2a
- Agent-to-agent IPC protocol.
- agency
- Agent-first architecture: roles, agency, and agent manifests.
- agent_
loop - Built-in kernel agent work loop.
- agent_
registry - Agent identity registry.
- app
- Application framework for WeftOS.
- artifact_
store - Content-addressed artifact store using BLAKE3 hashes (K3-G1).
- assessment
- Project assessment service for WeftOS kernel.
- auth_
service - Centralized credential management service – Plan 9 Factotum pattern (K5-G2).
- boot
- Kernel boot sequence and state machine.
- calibration
- Boot-time ECC benchmarking and capability advertisement (Phase K3c).
- capability
- Agent capabilities and resource limits.
- capability_
claim - Cross-node signed capability advertisements (WEFT-147). Cross-node capability-claim verification (WEFT-147).
- causal
- Causal graph DAG with typed/weighted directed edges.
- causal_
predict - Causal collapse prediction via O(1) analytical perturbation + EML correction.
- causal_
state_ fold - Fold-replay for causal node lifecycle state (ADR-067 P1-graph / WEFT-629).
- chain
- Local exochain manager for kernel event logging.
- chain_
anchor - Chain-head external anchoring beyond
MockAnchor. - chain_
migrate weaver migrate user-chain: copy the legacy~/.clawftchain to the Phase 1 user chain location (~/.weftos/chain), verified, source untouched.- chain_
rule_ hash - Lock-free holder for the current rule hash (ADR-103 A7).
- chain_
storage - Pin the chain storage location once at boot, and guard it with a lock.
- chain_
subscribe - Chain subscription: replay-from-sequence plus live events (ADR-103 D).
- cluster
- Cluster membership and node fabric.
- cog_
ingest - Cog ingest bridge (mesh-placement-10; ADR-100 section 4 and the “Decision 5 resolved” amendment).
- cognitive_
tick - Configurable cognitive tick loop – the heartbeat of the ECC cognitive substrate.
- coherence
- Conversation coherence as a soft dampener, not a hard gate (ADR-062 D6).
- config
- Kernel configuration re-exports and extensions.
- config_
service - Configuration and secrets service (K5-G1).
- console
- Kernel console: boot event types and output formatting.
- container
- Container integration for sidecar service orchestration.
- context_
graft - Session-scoped context graft layer (ADR-058 Phase 3).
- context_
promote - Postmortem promotion +
memory.promotechain event (ADR-058 Phase 4.2/4.3). - cron
- Cron scheduling service for WeftOS kernel.
- crossref
- Universal cross-references between forest structures.
- dead_
letter - Dead letter queue for undeliverable messages.
- democritus
- DEMOCRITUS continuous cognitive loop (ECC decision D5).
- duplex
- Daemon-side full-duplex conversation-floor state machine (ADR-068 D1).
- ecc_
segment - ECC RVF segment type definitions (WEFT-508).
- embedding
- Pluggable embedding backends for ECC vector operations (K3c-G2).
- embedding_
e5 - e5-small-v2 ONNX embedding provider (WEFT-640).
- embedding_
onnx - ONNX, sentence-transformer, and AST-aware embedding backends (K3c-G2).
- embedding_
qwen3 - Qwen3-Embedding-0.6B provider (ADR-059) — the preferred ECC embedder.
- eml_
coherence - O(1) coherence approximation via EML (exp(x) - ln(y)) master formula.
- eml_
kernel - EML learned functions for kernel subsystems.
- eml_
persistence - EML model persistence — save/load all 12+ EML models to
.weftos/eml-models/. - environment
- Environment scoping for WeftOS governance.
- error
- Kernel error types.
- floor
- Conversational floor as a scored read, not an engine (ADR-062 D4).
- gate
- Gate backend abstraction for permission decisions.
- governance
- Constitutional governance engine for WeftOS.
- governance_
overlay - Project governance overlay, kernel side: load, merge, hash (ADR-103 D8). Project governance overlay, kernel side (ADR-103 A6, D8, Phase 2 package E).
- governance_
project - Project attribution of governance requests (ADR-103 A6, Phase 2 package I).
- health
- Health monitoring subsystem.
- heartbeat
- Heartbeat scheduler for agent lifecycle management.
- hnsw_
eml - EML-based HNSW search optimization.
- hnsw_
service - HNSW vector search as a kernel
SystemService. - http_
api - HTTP API for WeftOS task execution.
- http_
facade - Transport-agnostic REST + SSE facade types (WEFT-122 / Cognitum gaps #6–#8).
- impulse
- Ephemeral causal impulse queue for inter-structure communication (ECC Phase K3c).
- infer_
proxy - Stable inference address, proxy and resolution (card mesh-placement-19; ADR-101 section 5).
- ipc
- Kernel IPC subsystem.
- key_
rotation - S10 key rotation: dual-signed ExoChain event + verifier (WEFT-107).
- lewm_
invariant - LeWM ↔ ECC decoupling invariants (WEFT-519 / ADR-090).
- licence
- Seed licence proxy, member side (ADR-106 phase 1a).
- log_
service - Structured log service with ring buffer, query, and subscription support.
- mesh
- Mesh transport abstractions for WeftOS cluster networking (K6.1).
- mesh_
admit - Mesh peer admission (P3-K1, ADR-103, plan section 1.5).
- mesh_
admit_ gate - Verdict sources and the cryptographic admission gate (P3-K1).
- mesh_
artifact - Artifact exchange over the mesh (ADR-099 section 6, mesh-placement-11).
- mesh_
artifact_ peers - Peer-set and scheduling abstractions for artifact fetches
(mesh-placement-11). v1 uses one peer at a time with
SequentialScheduler; card 25 adds multi-source scheduling here. - mesh_
artifact_ pkg - Signed packages over the artifact exchange (mesh-placement-11).
- mesh_
artifact_ transfer - Serve and fetch for the artifact piece protocol (mesh-placement-11).
- mesh_
artifact_ tunnel - Artifact streams over machine-mesh deliveries (ADR-106 section 5.4).
- mesh_
artifact_ types - Shared types of the artifact piece protocol (mesh-placement-11):
ids, keys, the
havebitfield, the piece-list descriptor, limits and exchange configuration. Seecrate::mesh_artifact_wirefor the codec. - mesh_
artifact_ wire - Wire types for the swarm-ready artifact piece protocol (ADR-099 section 6, mesh-placement-11).
- mesh_
assess - Real-time cross-project assessment mesh transport (K6.6 / SOP 3).
- mesh_
bootstrap - Static seed peer bootstrap discovery (K6.2).
- mesh_
chain - Chain replication protocol for mesh networking (K6.4).
- mesh_
clock - Injectable clock for mesh time-dependent components (WEFT-113).
- mesh_
cog - Cog checkout and artifact transfer over machine-mesh deliveries (ADR-106 sections 4 and 5, phase 1c).
- mesh_
dedup - Message deduplication for mesh IPC (K6.3).
- mesh_
delivery - How the mesh hands inbound messages to the local side (P3-K0, K1).
- mesh_
discovery - Peer discovery for mesh networking (K6.2).
- mesh_
framing - Length-prefix framing for mesh wire protocol (K6.1).
- mesh_
heartbeat - SWIM-style heartbeat and failure detection for mesh (K6.5).
- mesh_
ipc - Cross-node IPC message serialization for mesh transport (K6.3).
- mesh_
kad - Kademlia DHT for WeftOS mesh peer discovery (K6.2).
- mesh_
leaf - Parent-side ADR-103 leaf admission and replay floor.
- mesh_
limits - Connection limits for the mesh listener (P3-K1): caps and timeouts. The per-IP cap and first-frame timeout apply in every admission mode; the idle timeout only under a strict gate.
- mesh_
listener - Mesh connection accept loop and peer registration (K6.1).
- mesh_
liveness - Mesh liveness and round-trip time: a ping/pong between verified peers.
- mesh_
load - A small load sample a node attaches to its liveness pongs (fleet P3).
- mesh_
log - Cross-node log aggregation for mesh networking (K6-G2).
- mesh_
mdns - mDNS LAN discovery for WeftOS mesh networking (K6.2).
- mesh_
mode - Which mesh mode a kernel boots in (P3-K0, P3-U).
- mesh_
noise - Noise Protocol encryption for mesh transport (K6.1).
- mesh_
process - Distributed process table for mesh networking (K6.5).
- mesh_
quic - QUIC transport via quinn (WEFT-118 / ADR-026). Feature-gated
quic. QUIC transport backend for mesh networking (WEFT-118 / ADR-026). - mesh_
runtime - Mesh runtime orchestrator for WeftOS node-to-node communication (K6).
- mesh_
sensor - Mesh sensor topics for LeWM observational frames (WEFT-526).
- mesh_
serve - Mesh accept loop and seed-connect loop (P3-K0).
- mesh_
service - Cross-node service registry query protocol (K6.3).
- mesh_
service_ adv - Service advertisement for mesh networking (K6.5).
- mesh_
swarm_ cache - Artifact cache with pinned and evictable entries (ADR-099 section 6, card mesh-placement-25).
- mesh_
swarm_ fetch - Multi-source swarm fetch (ADR-099 section 6, card mesh-placement-25).
- mesh_
swarm_ governance - Governance of what a node seeds, holds and accepts from peers (ADR-099 section 6, card mesh-placement-25).
- mesh_
swarm_ lookup - “Who has this artifact” over the mesh, with no central tracker (ADR-099 section 6, card mesh-placement-25).
- mesh_
swarm_ picker - Piece and peer selection for swarm fetches (ADR-099 section 6, card mesh-placement-25). Pure logic, no I/O.
- mesh_
swarm_ pkg - Signed packages over the swarm (ADR-099 section 6, card
mesh-placement-25):
ArtifactExchange::swarm_fetch_packageisArtifactExchange::fetch_packagewith every artifact pulled from many holders at once. - mesh_
swarm_ rate - Bandwidth caps for the artifact swarm (ADR-099 section 6, card mesh-placement-25).
- mesh_
swarm_ revoke - Revocation across the mesh (ADR-099 section 6, card mesh-placement-25).
- mesh_
swarm_ state - Per-node swarm state held by
crate::mesh_artifact::ArtifactExchange(ADR-099 section 6, card mesh-placement-25): bandwidth caps, banned peers, measured link speeds, the revocation list, the seeding record and the cache hook. - mesh_
system_ service - Mesh as a
SystemService— start/stop/health_check lifecycle (WEFT-119). - mesh_
tcp - TCP transport backend for mesh networking (K6).
- mesh_
test_ support - Multi-node mesh test fixtures (WEFT-112). Available outside
cfg(test)so downstream crates and integration tests can construct in-memory meshes. Multi-node mesh test fixtures (WEFT-112). - mesh_
tree - Resource tree synchronization for mesh networking (K6.4).
- mesh_ws
- WebSocket transport backend for mesh networking (K6).
- metrics
- Kernel metrics collection with lock-free counters, gauges, and histograms.
- model_
manifest - Model manifest, adopt-in-place and weights locality (card mesh-placement-17; ADR-101 section 3, ADR-099 section 6).
- monitor
- Process links and monitors (K1-G2).
- named_
pipe - Named pipes for persistent IPC channels.
- node_
facts - Node facts probes and TTL cache (ADR-099 section 2, card mesh-placement-03). Node facts probing, local advertisement and the facts TTL cache (ADR-099 section 2, card mesh-placement-03).
- node_
facts_ advert - Signed node facts, beside
capability_claim(card mesh-placement-03). Signed node facts (ADR-099 section 2, card mesh-placement-03). - node_
facts_ exchange - Node facts and deltas over the mesh with receiver-assigned trust (card mesh-placement-03). Node facts over the mesh (ADR-099 sections 2 and 8, card mesh-placement-03).
- node_id
- The one node-id derivation (ADR-103 D11). The one node-id derivation (ADR-103 D11, ADR-025).
- node_
key - File-backed node key shared by the daemon and one-shot foreground boots.
File-backed node key (
<runtime-dir>/node.key). - node_
registry - Node identity registry.
- overlay_
runtime - A project kernel’s live governance: boot, reload, parent updates. A project kernel’s live governance: boot, reload and parent updates (ADR-103 A6, D8, Phase 2 package E).
- overlay_
trust - Trust root, rollback pin and revocation checks of a project kernel.
Trust root, rollback pin and revocation checks of a project kernel
(ADR-103 D8, package E). Split from
overlay_runtime. - parent_
policy - The signed parent policy the user daemon exports (ADR-103 D8). The signed parent policy (ADR-103 A6, D8, Phase 2 package E).
- persistence
- Unified persistence coordinator for kernel state.
- placement_
vocabulary - Governed loading and changing of the placement capability vocabulary (ADR-099 decision 6; card mesh-placement-02).
- process
- Process table for PID-based agent tracking.
- profile_
store - Per-user profile namespaces (Cognitum Seed Gap #14).
- project_
identity - Project identity: the project key, its certificate and the revocation view (ADR-103 A6/A7, Phase 2 package C).
- quantum_
backend - Quantum backend abstraction for WeftOS.
- quantum_
braket - AWS Braket backend stub targeting QuEra Aquila.
- quantum_
pasqal - Pasqal Cloud backend — live implementation (EXPERIMENTAL, 0.6.x).
- quantum_
register - Graph → 2D atom register layout, shared across quantum backends.
- quantum_
state - Quantum-inspired cognitive state for the ECC substrate.
- rate_
limit - Keyed sliding-window rate limiter (WEFT-148).
- reconciler
- Reconciliation controller (K2b-G1).
- refusal_
budget - Bound on chain writes caused by unauthenticated requests. Bound on chain writes caused by unauthenticated requests.
- reliable_
queue - Reliable message delivery with acknowledgment tracking.
- revocation
- Persistent host revocation (ban list).
- rule_
distribution - Cluster-wide
GovernanceRuledistribution (WEFT-146). - sensor_
graph - Spatio-temporal GNN for distributed sonobuoy / sensor arrays (KG-013 / WEFT-354).
- service
- System service registry and lifecycle management.
- spatial_
backend - Unified spatial index backend trait (ADR-056 §8 / WEFT-718).
- spatial_
bvh - BVH-backed
SpatialBackend(WEFT-718 / ADR-056 Phase C). - spatial_
service - Spatial BVH as a kernel
SystemService(ADR-035 / WEFT-718). - stream_
anchor - Stream-window chain anchor.
- substrate_
service - Kernel-side substrate service.
- supervisor
- Agent supervisor for process lifecycle management.
- talk_
loop - Talk-Mode tick service — the orchestration heart of the ECC graph-walk voice conversation (ADR-062 §Architecture, Phase 2.1).
- thin_
edge - Desktop thin edge over localhost — Phase 1 scaffold (ADR-068 / WEFT-628).
- timer
- Timer service: one-shot and repeating timers with message delivery.
- token_
authority - Token authority (ADR-102 D3/D4, ADR-103 user role).
- topic
- Pub/sub topic routing for kernel IPC.
- tree_
manager - Unified tree-chain facade for the exo-resource-tree subsystem.
- tree_
view - Per-agent tree views with capability-based access filtering (K5-G3).
- user_
key_ rotation - User-key rotation records and the trust history they build (ADR-103 A13).
- vector_
backend - Unified vector search backend trait.
- vector_
diskann - DiskANN-backed
VectorBackendimplementation. - vector_
hnsw - HNSW-backed
VectorBackendimplementation. - vector_
hybrid - Hybrid vector backend: hot HNSW cache + cold DiskANN store.
- vector_
quantization - In-tree LogQuantized + unified distance kernels (WEFT-15 / 128 / 352 / 353).
- view_
resolver - View resolution seam for the multiplexed
TalkModeLoop. - wasm_
runner - WASM tool execution sandbox and built-in tool catalog.
- weaver
- WeaverEngine: ECC-powered codebase modeling service (K3c-G1).
- workload_
ctl - Placement control plane (ADR-099 sections 3 and 7; card mesh-placement-12): the pure engine (card 04) wired to the mesh.
- workload_
governance - Governance actions, audit events and permits for placed workloads (ADR-099). Governance for placed workloads (ADR-099 sections 4 and 7).
- workload_
kind - Workload-kind registry (cog-boundary audit M3; ADR-099 section 2).
- workload_
pkg - Signed workload package manifests (mesh-placement-07; ADR-100 section 1, ADR-099 section 8).
- workload_
runtime - Workload runtime adapters (mesh-placement-09; ADR-099 section 5, ADR-100 sections 3-5).
Structs§
- Cluster
Network Config - Cluster networking configuration for distributed WeftOS nodes.
- Kernel
Config - Kernel subsystem configuration.
- Pairing
Config - Configuration for time-windowed mesh pairing.
- Profiles
Config - Per-user profile namespace configuration.
- Vector
Config - Unified vector search backend configuration.
- Vector
Disk AnnConfig - DiskANN-specific vector configuration.
- Vector
Hnsw Config - HNSW-specific vector configuration.
- Vector
Hybrid Config - Hybrid backend-specific configuration.
Enums§
- Vector
Backend Kind Config - Which vector search backend to use.
- Vector
Eviction Policy - Eviction policy for the hybrid backend’s hot tier.