1mod canonical_apply;
6pub use canonical_apply::prepare_canonical_changeset;
7
8#[cfg(test)]
9mod test_process;
10
11pub mod actor_identity;
12pub mod agent_lifecycle;
13#[doc(hidden)]
14pub use khive_retrieval::ann::registry as ann_registry;
15pub mod atomic_message;
16pub mod atomic_plan;
17pub mod atomic_prepare;
18pub mod atomic_runner;
19pub mod audit_batch;
20pub mod audit_error;
21pub mod backend_handle;
22pub mod blob;
23pub mod blob_tree;
24pub mod bounded_read;
25pub mod build_info;
26mod code_map_runtime;
27pub use code_map_runtime::{
28 CodeMapRegistry, FileIdentity, RegisteredCodeMap, RegistrationGeneration,
29};
30pub mod comm_recipient;
31pub mod comm_transport;
32pub mod config;
33pub mod config_ledger;
34pub mod context;
35pub mod cost_unit;
36pub mod credentials;
37mod visibility_receipts;
38pub use visibility_receipts::AuthenticatedVisibilityReceipt;
39pub mod curation;
40pub mod daemon;
41pub mod email_message_id;
42pub mod embedder_registry;
43pub mod embedding;
44pub mod embedding_reranker;
45pub mod embedding_warning;
46pub mod engine_config;
47pub mod entity_write;
48pub mod error;
49mod error_projection;
50mod event_actor_scope;
51mod event_cursor_walk;
52mod event_page;
53mod event_store_guard;
54pub mod events_split;
55mod fence_identity;
56pub mod file_policy;
57pub mod fusion;
58pub mod graph_traversal;
59pub mod hooks;
60mod index_repair;
61pub use index_repair::IndexRepairReport;
62pub mod graph_lint;
63pub mod input_schema;
64pub mod keyed_memory;
65#[cfg(test)]
66mod keyed_memory_tests;
67pub mod keyed_message;
68mod kg_read;
69mod live_until;
70mod mailbox_view;
71mod note_create;
72mod note_index;
73mod note_read;
74pub mod note_search_ann;
75mod note_store_guard;
76mod note_validation;
77pub mod note_write;
78#[cfg(test)]
79mod note_write_tests;
80pub mod objectives;
81pub mod operations;
82mod outbound_email_policy;
83pub use outbound_email_policy::OutboundEmailPolicy;
84pub use outbound_email_policy::{
85 inbound_email_is_suppressed, outbound_email_is_suppressed, EmailSuppression,
86 EmailSuppressionKind, EmailSuppressionScope, SuppressionMirror,
87};
88pub mod pack;
89pub mod pack_metadata;
90mod params;
91pub mod phase_events;
92pub mod portability;
93pub mod preference_verification;
94pub mod presentation;
95pub mod process_group;
96pub mod process_retry;
97pub mod reference_resolution;
98pub mod reference_ring;
99pub mod registry;
100pub mod resource;
101pub mod resource_admission;
102pub mod retrieval;
103pub mod runtime;
104pub mod search_audit;
105pub mod secret_gate;
106pub(crate) mod secret_gate_finalizer;
107mod sql_include;
108#[cfg(test)]
109mod stage_overlap_tests;
110mod stage_seam;
111mod streams;
112pub mod telemetry_config;
113pub use streams::{
114 refusal_value, StreamAppendDisposition, StreamAppendFailure, StreamAppendSpec,
115 StreamBatchMember, StreamBatchRefusal, StreamObservation, StreamWriteSpec,
116};
117pub mod time_anchor;
118pub use khive_storage::usage;
119pub mod validation;
120
121pub use context::{ContextContributor, ContextRequest, ContextSlice, ScoreSemantics};
122
123pub use actor_identity::{actor_is_unattributed, resolve_actor, should_warn_unattributed_actor};
124pub use agent_lifecycle::{
125 apply_transition, spawn_fingerprint, AgentRecord, AgentState, IllegalTransition,
126 TerminalReason, Transition, Trigger,
127};
128pub use atomic_message::{create_notes_atomic_with_report, AtomicNoteSpec};
129pub use atomic_plan::{
130 AddEntityPlan, AddNotePlan, AffectedRowGuard, DeletePlan, GovernanceOp, GovernancePlan,
131 GtdCompletePlan, GtdTransitionPlan, LinkPlan, MergePlan, PlanPredicate, PlanStatement,
132 PostCommitEffect, UpdatePlan,
133};
134pub use atomic_runner::{
135 run_atomic_unit, AtomicOpFailure, AtomicOpPlan, AtomicRunOutcome, AtomicRunnerError,
136 CommittedPostCommitEffects,
137};
138pub use backend_handle::{BackendHandle, BackendHandleError, RetrievalTier};
139pub use blob::{
140 resolve_blob_store, resolve_blob_store_for_mode, BlobHydrator, GovernedBlobError, VerifiedBlob,
141 DEFAULT_BLOB_HYDRATION_BYTES,
142};
143pub use build_info::{BuildInfo, BUILD_INFO, BUILD_VERSION};
144pub use config::{ann_fresh_tail_enabled_from_env, process_ref_from_env, WalCeilingSource};
145pub use cost_unit::{base_resource_payload, cost_unit_for_dispatch, resource_payload};
146pub use curation::{
147 entity_embedding_text, entity_fts_document, entity_merge_guard_compared_values,
148 entity_merge_guard_error, entity_merge_guard_refusal_message, note_embedding_text,
149 note_fts_document, validate_entity_merge_floor, ContentMergeStrategy, EdgeListFilter,
150 EdgePatch, EntityDedupMergePolicy, EntityMergeGuard, EntityPatch, GuardedNoteMerge,
151 MergeAssertion, MergeEdgeConflictPreimage, MergeEdgePreimage, MergeSummary,
152 MergeTxBudgetReport, MergeTxLimits, NoteMergeGuard, NotePatch, NoteUpdatePolicy,
153};
154#[cfg(unix)]
155pub use daemon::{acquire_recovery_lock, pid_path, run_daemon, socket_path, DaemonDispatch};
156pub use daemon::{
157 active_phase_names, background_task_count, background_task_names, daemon_shutdown_token,
158 recall_ledger_snapshot, register_active_phase, spawn_named_tracked_task, track_background_task,
159 track_named_background_task, track_recall_ledger_task, DaemonRequestFrame, DaemonResponseFrame,
160 PhaseGuard, PROTOCOL_VERSION, UNNAMED_BACKGROUND_TASK,
161};
162pub use email_message_id::{EmailMessageIdDomains, HISTORICAL_DOMAINS_ENV};
163pub use embedder_registry::{EmbedderProvider, EmbedderRegistry, LatticeEmbedderProvider};
164pub use embedding::{EmbeddingModelRecord, EmbeddingModelStatus};
165pub use embedding_reranker::{EmbeddingCosineReranker, EmbeddingRerankHit};
166pub use engine_config::{
167 config_from_env, resolve_wal_ceiling, BackendConfig, BackendKind, BlobConfig,
168 BrainSectionConfig, CodeMapConfig, ConfigError, EngineConfig, GateSectionConfig,
169 GitWriteEntryConfig, GitWriteSectionConfig, KhiveConfig, PackConfig, ResolvedWalCeiling,
170 StorageSectionConfig,
171};
172pub use error::{
173 fts_text_leg_or_err, AdmissionFailureContext, AuditObligationFailure, AuditObligationReason,
174 ChannelIngestFailureClass, DenialAuditOutcome, DenialReceipt, DispatchError, DomainDisposition,
175 GuardedWriteFailure, ReceiptRefusal, RefusalEventContext, RefusalEventRecording,
176 RefusalRecordingErrorClass, RuntimeError, RuntimeResult, WriterPoolCheckoutTimeoutContext,
177 WriterTaskFailureContext, SQLITE_WAL_CAPACITY_REFUSED_STAGE,
178 SQLITE_WAL_CAPACITY_UNAVAILABLE_STAGE, WRITER_ADMISSION_SCOPE,
179 WRITER_POOL_CHECKOUT_TIMEOUT_STAGE, WRITER_QUEUE_SATURATED_STAGE,
180 WRITER_TASK_REQUEST_FAILED_STAGE, WRITER_TASK_TERMINATED_STAGE,
181};
182pub use error_projection::{
183 failure_entry_parts, failure_error_disposition, runtime_error_value, FailureEntryParts,
184 FailureEntrySource,
185};
186pub use event_actor_scope::{resolve_event_actor_read_scope, EventActorReadScope};
187pub use event_cursor_walk::{visit_events_cursor_walk, EventCursorWalkError};
188pub use event_page::{
189 page_budget_exceeded_error, row_exceeds_budget_error, EventReadPageRequest, EventReadPageResult,
190};
191pub use event_store_guard::EventAttribution;
192pub use fusion::FusionStrategy;
193pub use graph_traversal::PathNode;
194pub use kg_read::KgNeighborRead;
195pub use khive_db::env::{env_flag, env_parse_or};
196pub use khive_db::{
197 checkpoint_once, run_checkpoint_task, run_migrations, stores::event::event_insert_statements,
198 CheckpointConfig, CheckpointLifecycleOwner, CheckpointTick, ConnectionPool, StorageBackend,
199};
200pub use khive_gate::{
201 classify_operation, is_valid_mailbox_actor_label, split_stamped_label, ActorRef, AllowAllGate,
202 AuditDecision, AuditEvent, CallerEnrollmentGate, Gate, GateContext, GateDecision, GateError,
203 GateRef, GateRequest, MailboxPolicyError, MailboxReadGate, Obligation, OperationAccess,
204 CLASSIFIED_OPERATIONS, OPERATION_CLASSIFIER_VERSION, RUNTIME_STAMPED_ACTOR_KINDS,
205};
206pub use khive_storage::types::TraversalOptions;
207pub use khive_storage::{EventObservation, EventView, ObservationRole, ReferentKind};
208pub use khive_types::namespace::Namespace;
209pub use mailbox_view::MailboxView;
210pub use note_create::{effective_create_tags, EffectiveCreateTags};
211pub use objectives::{
212 AmplifiedDecayAwareSalienceObjective, DecayAwareSalienceObjective, GraphProximityObjective,
213 MemoryRecallPipeline, NoteCandidate, RerankerObjective, RetrievalCandidate, RrfFusionObjective,
214 TemporalRecencyObjective, TextRelevanceObjective, VectorSimilarityObjective,
215};
216#[cfg(any(test, feature = "fault-injection"))]
217pub use operations::{
218 arm_entity_compensation_fail_scoped, arm_fts_fail_many_partial_scoped,
219 arm_fts_fail_many_scoped, arm_fts_fail_scoped, arm_prefix_resolve_fail_scoped,
220 arm_rollback_cleanup_fail, arm_vector_fail_after, arm_vector_fail_scoped, FaultInjectionArm,
221};
222pub use operations::{
223 base_entity_endpoint_rules, base_entity_rule_allows, endpoint_matches,
224 hex_prefix_to_uuid_pattern, merge_entry_metadata, uuid_prefix_bounds, ConditionalInsertStage,
225 EdgeEndpointKind, EntityCreateSpec, LinkSpec, NoteCreateSpec, NoteSearchHit, NoteSearchOutcome,
226 PostCommitDegradation, PrefixScope, QueryResult, Resolved,
227};
228pub use pack::{
229 resolve_explicit_namespace, ChannelIngestCapability, DispatchHook, HandlerDef,
230 IdResolutionMode, IngestAuditStore, InterceptedDispatchResult, KindHook, NoteEmbeddingPolicy,
231 NoteEmbeddingPolicySpec, NoteKindSpec, NoteLifecycleSpec, NoteUpdateEffect, PackByIdResolver,
232 PackFactory, PackInstall, PackLoadError, PackMetadataRegistry, PackRegistration, PackRegistry,
233 PackRuntime, PackSchemaCollisionError, PackSchemaPlan, ParamDef, RequestIdentity, SchemaPlan,
234 VerbCategory, VerbPresentationPolicy, VerbRegistry, VerbRegistryBuilder, VerifiedActor,
235 Visibility, AUDIT_PERSISTENCE_SKIPPED_READ_ONLY,
236};
237pub use params::{deser_params, integer_params_from_whole_floats};
238pub use phase_events::{emit_phase_event, is_benign_shutdown_cancellation};
239pub use portability::{ImportSummary, KgArchive};
240pub use preference_verification::{LegacyPreferenceVerifier, VerifiedModelNetworkAttachment};
241pub use presentation::{
242 apply_redundancy_drop, micros_to_iso, prepare_format_value, present, present_with_policy,
243 render_format, rfc3339_to_utc_micros, OutputFormat, PresentationMode, RedundancyScope,
244};
245pub use reference_resolution::{
246 resolve_reference, resolve_reference_with_entity_type, ReferenceCandidate, ReferenceResolution,
247};
248pub use reference_ring::{ReferenceRing, RingEntry};
249pub use registry::{ObjectiveRegistry, RegisteredObjective};
250pub use resource::{cpu_delta_us, process_resource_usage, ProcessResourceUsage};
251pub use retrieval::{HybridSearchOutcome, RankScoreKind, SearchHit, SearchSignals, SearchSource};
252pub use runtime::{
253 assert_captured_db_anchor_consistent, assert_db_anchor_consistent, expand_tilde,
254 parse_pack_list, resolve_db_anchor, resolve_project_actor_id, runtime_config_from_khive_config,
255 BackendId, EntityTypeValidatorFn, KhiveRuntime, NamedVectorIdentity, NamespaceToken,
256 NoteMutationHookFn, NoteWriteValidatorFn, OpenedDiagnosticBackend, RuntimeConfig,
257};
258pub use secret_gate::SecretMatch;
259pub use secret_gate_finalizer::{
260 EntityCandidateAdmission, EntityCandidateContext, EntityCandidateMutation,
261 EntityCandidateOrigin, EntityCandidatePrepared, EntityFinalizationPlan,
262};
263pub use telemetry_config::{
264 TelemetryCarrier, TelemetryChannelConfig, TelemetryConfig, TelemetryFailurePosture,
265 TelemetryPolicy,
266};
267pub use validation::{
268 GraphPatch, GraphSnapshot, RuleFn, RuleId, Severity, ValidationContext, ValidationReport,
269 ValidationRule, Violation,
270};
271
272#[cfg(test)]
273mod mount_config_tests;
274
275pub mod mount_config;
276
277pub mod mounted_verb;