pub mod anchor;
pub mod backend;
pub mod binding;
pub mod binding_intent;
pub mod binding_run;
pub mod build_info;
pub mod check;
pub mod check_path;
pub mod chunking;
pub mod derivation;
pub mod domain_authority_wire;
pub mod engine;
pub mod entity;
pub mod error;
pub mod filesystem;
pub mod friction;
pub mod graph;
pub mod markdown;
pub mod mem;
pub mod mem_management;
pub mod ops;
pub mod overview;
pub mod pipeline;
pub mod pipeline_edit;
pub mod pipeline_store;
pub mod preparation;
pub mod provenance;
pub mod render;
pub mod runtime_validator;
pub mod schema_source;
#[cfg(not(target_arch = "wasm32"))]
pub mod search_index;
pub mod section_format;
pub mod source_scope;
pub mod storage;
pub mod store;
pub mod validator;
pub mod vcs;
pub mod workspace;
pub mod workspace_config_edit;
pub mod workspace_create;
pub mod workspace_root;
pub mod workspace_store;
use std::sync::Arc;
use memstead_schema::{TypeDefinition, type_by_name};
pub use anchor::{
ANCHOR_SIDECAR_PATH, Anchor, AnchorGrain, AnchorHashStability, AnchorInput,
AnchorProvenanceClass, AnchorSidecar, AnchorState, AnchorValidationError, AnchorVersion,
ArtifactObservation, EntityAnchorComposition, INVALID_ANCHOR_CODE, compose_entity_anchors,
resolve_anchor,
};
pub use backend::{BackendError, MemBackend};
pub use engine::drift::{EngineHandle, OperationScope};
pub use engine::{
BackendFactory, BootError, CreateEntityArgs, CreateEntityOutcome, DeleteEntityArgs,
DeleteEntityOutcome, DeleteReferrers, DisjointMerge, Engine, EngineError, EntityHistoryReport,
EntityTouch, ExpectedHash, FromArchiveBytesError, GitBranchBranchResetFn,
GitBranchChangesSinceFn, GitBranchCreateBranchAtFn, GitBranchDiffFn, GitBranchExportFn,
GitBranchExportToBytesFn, GitBranchFetchFn, GitBranchLsRemoteFn, GitBranchMergeDisjointFn,
GitBranchOps, GitBranchPullFn, GitBranchPushFn, GitBranchReadConfigAtRefFn,
GitBranchReadTreeFn, GitBranchResolveRefFn, HISTORY_PAGE_DEFAULT, HISTORY_PAGE_MAX,
HashOverride, INLINE_LIST_CAP, MutationClock, ReferrerInfo, RelateAction, RelateEntityArgs,
RelateEntityOutcome, RenameEntityArgs, RenameEntityOutcome, RetypeEdge, RetypeEdgeDirection,
RetypeEntityArgs, RetypeEntityOutcome, RetypeProblem, ReviewMarkStatus, SchemaSourceDiagnostic,
SchemaStaging, SetReviewMarkOutcome, StoryStart, UpdateEntityArgs, UpdateEntityOutcome,
format_inline_list_overflow,
};
pub use entity::id::{ENTITY_ID_MAX_LEN, SlugError, TITLE_GRAMMAR_RULE};
pub use entity::parser::{
Frontmatter, body_after_frontmatter, frontmatter_parts, peek_type_from_frontmatter,
split_frontmatter_core,
};
pub use entity::{Entity, EntityId, MetadataValue, ParseResult, Relationship};
pub use error::{FullEngineError, RecoveryAction};
pub use graph::{ClusterInfo, LouvainOutput};
pub use mem::{MEM_META_DIR, MemOrigin, MemRouterSnapshot};
pub const ENGINE_VERSION: &str = env!("CARGO_PKG_VERSION");
pub use mem_management::{CreateRuleSet, DeleteRuleSet, MatcherSet, MatcherSetError};
pub use ops::{
BackendChanges, BatchEntry, BatchError, BatchResult, ChangeEnvelope, ChangesReport,
ContextResult, CreateArgs, CreateResult, DeleteResult, EMPTY_TREE_SHA, ExportResult, Facets,
HealthReport, HealthSummary, ListResult, MemExportResult, ModifiedMetadata, ModifiedSections,
Query, RENAME_SIMILARITY_DEFAULT, RENAME_SIMILARITY_MAX, RENAME_SIMILARITY_MIN, RelateArg,
RelateResult, ReloadReport, ReloadResult, RenameResult, SearchHit, SearchResult, SearchScope,
SetMemVersionOutcome, UpdateArgs, UpdateResult, WarningHint,
};
pub use pipeline::{IngestTrigger, MediumType, PatternEntry, PatternMode};
pub use pipeline_edit::PipelineEditError;
pub use pipeline_store::{BindingConfigs, MemPipelineRecord, load_pipeline_configs};
pub use provenance::{Provenance, ProvenanceKind};
pub use store::{Edge, EdgeSource, InEdge, Store};
pub use workspace::{
CreateRuleSetting, DeleteRuleSetting, MEMSTEAD_CHECKS_REF_BRANCH, MEMSTEAD_REF_BRANCH, Mount,
MountCapability, MountLifecycle, MountStorage, SCHEMA_WILDCARD, Workspace, WorkspaceSettings,
branch_full_ref, branch_short_name, checks_ref_member_path, schema_registry_gitdirs,
};
pub use workspace_store::{
FileWorkspaceStore, InstantiateError, Layout, StoreError, WORKSPACE_STORE_DIR,
WorkspaceStoreAdapter, detect_layout, instantiate_local_backend, is_mem_repo_shaped,
is_workspace_root, standalone_workspace, workspace_shape_label,
};
pub fn hex_lower(bytes: &[u8]) -> String {
use std::fmt::Write;
bytes
.iter()
.fold(String::with_capacity(bytes.len() * 2), |mut s, b| {
let _ = write!(s, "{b:02x}");
s
})
}
pub fn engine_fallback_type() -> Arc<TypeDefinition> {
type_by_name("spec").expect("spec type must exist in the default builtin schema")
}