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