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§
- Admin
Request - Request to perform an admin action.
- Admin
Response - Result of an admin operation.
- Assemble
Context Request - Graph-aware retrieval — semantic search + neighbourhood traversal + impact analysis composed into a single payload.
- Assemble
Context Response - Result of a graph-aware context assembly.
- Bulk
Update Context Request - Batch write — N entries written under a single backend transaction.
- Bulk
Update Context Response - Outcome of a batch write.
- Entity
Context Item - Metadata for a single entity surfaced during context assembly.
- Health
Report - Snapshot of system liveness + capacity.
- Manage
Entity Request - Request to perform an entity-maintenance action.
- Manage
Entity Response - Result of an entity-maintenance operation.
- Manage
Session Request - Request to perform a session-management action.
- Manage
Session Response - Result of a session-management operation.
- Manage
Workspace Request - Request to perform a workspace-management action.
- Manage
Workspace Response - Result of a workspace-management operation.
- Query
Context Request - Structured / keyword query against the session’s context updates.
The
query_typeenum mirrors the legacy MCPquery_conversation_contextquery_typeparameter. - Query
Context Response - Result of a structured context query.
- Search
Hit - A single match from a semantic search.
- Semantic
Search Request - Parameters for a semantic similarity search.
- Semantic
Search Response - Result of a semantic search operation.
- Structured
Summary Request - Request for a structured summary of a session.
- Structured
Summary Response - Structured summary of a session’s accumulated context.
- Update
Context Request - A single context-update write.
- Update
Context Response - Outcome of a single write.
Enums§
- Admin
Action - Administrative operations exposed through the service surface.
- Entity
Action - Operations that can be performed on entities.
- Search
Scope - Scope of a semantic search.
- Session
Action - Operations that can be performed on sessions.
- Workspace
Action - Operations that can be performed on workspaces.
Traits§
- Post
Cortex Service - Canonical post-cortex service.
Type Aliases§
- DynPost
Cortex Service - Convenience alias — most consumers carry the trait behind an
Arc.