Skip to main content

Crate post_cortex_core

Crate post_cortex_core 

Source
Expand description

Core domain library for post-cortex — types, error, and lightweight domain modules.

This crate is the dependency root of the workspace. It contains only the types and helpers needed to describe a post-cortex conversation: session, graph, workspace, summary, and the cross-cutting primitives under core. Heavy infrastructure lives in dedicated sibling crates:

ConcernCrate
gRPC wire typespost_cortex_proto
Storage backends (RocksDB, SurrealDB)post-cortex-storage
Embeddings + HNSWpost-cortex-embeddings
Conversation memory orchestratorpost-cortex-memory
MCP tool librarypost-cortex-mcp
rmcp + axum + tonic daemonpost-cortex-daemon

Library users embedding post-cortex into their own Rust applications depend on post-cortex-core if they want the type system only, or on post-cortex-memory (which transitively pulls core + storage + embeddings) if they want a ready-to-use memory system.

See /Users/julius/.claude/plans/stateful-hugging-hopper.md for the migration plan that produced this layout.

Re-exports§

pub use crate::core::error::Result;
pub use crate::core::error::SystemError;
pub use post_cortex_proto as proto;

Modules§

core
Cross-cutting primitives shared by every post-cortex crate.
graph
Entity graph + GraphRAG types — petgraph-backed knowledge graph used to enrich semantic search with relationship traversal. Graph module for entity relationships and Graph-RAG enrichment
services
Canonical services::PostCortexService trait. Every transport (gRPC, MCP, REST) delegates to the same single implementation in post-cortex-memory. Canonical service trait for post-cortex.
session
ActiveSession and session-component types — the hot-context cache
summary
Read-only summary projection types (decisions, entities, timeline) consumed by MCP get_structured_summary and the gRPC equivalent. Summary generation and presentation types.
workspace
Workspace types — WorkspaceManager, SessionRole, the entities that group multiple sessions for cross-session search. Workspace module for organizing related sessions (e.g., microservices)

Macros§

new_cache
Convenience macro for creating a cache