Skip to main content

Module services

Module services 

Source
Expand description

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.

PostCortexService is the single internal entrypoint that every transport layer (gRPC, MCP, REST, future SDKs) delegates to. Per TODO.md:106-117 we never want two transports re-implementing the same operation with subtly different validation; they each translate their wire payload, then call the same method on this trait. The canonical impl lives in post-cortex-memory as MemoryServiceImpl.

§Scope

Phase 4 introduces the trait skeleton with the read/write/search/manage operations every transport exposes. Phases 6 + 7 (MCP and daemon extraction) migrate the existing handlers to delegate here; until then both transports still call into ConversationMemorySystem directly.

Trait methods intentionally take small, immediately-usable request types defined in types rather than huge proto structs — keeping the surface readable from non-gRPC consumers. gRPC handlers do the proto-to-domain translation in a single From/Into module at the transport boundary (Phase 7).

§Object safety

The trait is intentionally object-safe (no generic methods, no Self return types) so consumers — post-cortex-mcp in particular — can hold an Arc<dyn PostCortexService> and let downstream Rust projects plug in their own implementation without touching the MCP layer.

Modules§

types
Request / response types for super::PostCortexService.

Structs§

AdminRequest
Request to perform an admin action.
AdminResponse
Result of an admin operation.
AssembleContextRequest
Graph-aware retrieval — semantic search + neighbourhood traversal + impact analysis composed into a single payload.
AssembleContextResponse
Result of a graph-aware context assembly.
BulkUpdateContextRequest
Batch write — N entries written under a single backend transaction.
BulkUpdateContextResponse
Outcome of a batch write.
EntityContextItem
Metadata for a single entity surfaced during context assembly.
HealthReport
Snapshot of system liveness + capacity.
ManageEntityRequest
Request to perform an entity-maintenance action.
ManageEntityResponse
Result of an entity-maintenance operation.
ManageSessionRequest
Request to perform a session-management action.
ManageSessionResponse
Result of a session-management operation.
ManageWorkspaceRequest
Request to perform a workspace-management action.
ManageWorkspaceResponse
Result of a workspace-management operation.
QueryContextRequest
Structured / keyword query against the session’s context updates. The query_type enum mirrors the legacy MCP query_conversation_context query_type parameter.
QueryContextResponse
Result of a structured context query.
SearchHit
A single match from a semantic search.
SemanticSearchRequest
Parameters for a semantic similarity search.
SemanticSearchResponse
Result of a semantic search operation.
StructuredSummaryRequest
Request for a structured summary of a session.
StructuredSummaryResponse
Structured summary of a session’s accumulated context.
UpdateContextRequest
A single context-update write.
UpdateContextResponse
Outcome of a single write.

Enums§

AdminAction
Administrative operations exposed through the service surface.
EntityAction
Operations that can be performed on entities.
SearchScope
Scope of a semantic search.
SessionAction
Operations that can be performed on sessions.
WorkspaceAction
Operations that can be performed on workspaces.

Traits§

PostCortexService
Canonical post-cortex service.

Type Aliases§

DynPostCortexService
Convenience alias — most consumers carry the trait behind an Arc.