post_cortex_proto/lib.rs
1// Copyright (c) 2025, 2026 Julius ML
2// Licensed under the MIT License. See LICENSE at the workspace root.
3
4//! Protobuf + tonic-generated wire types for post-cortex.
5//!
6//! Single source of truth for the post-cortex gRPC schema. Downstream
7//! gRPC clients can depend on this crate alone — they pull `prost`,
8//! `prost-types`, and `tonic` (with its default transport features),
9//! but **not** the post-cortex-daemon server runtime or rmcp.
10//!
11//! # Public surface
12//!
13//! The [`pb`] module re-exports everything generated from
14//! `proto/pcx.proto` (package `pcx.v1`). For convenience the most
15//! frequently used wire types are also re-exported at the crate root —
16//! see the top-level `pub use pb::*` below.
17//!
18//! # Stability
19//!
20//! Breaking changes to the proto schema are breaking changes to this
21//! crate. SemVer applies normally; consumers should pin a minor version
22//! (`= "0.x"`) until 1.0.
23
24#![forbid(unsafe_code)]
25// Generated code from prost/tonic does not satisfy the strict doc lints;
26// scope the deny to our own modules only.
27#![deny(rustdoc::broken_intra_doc_links)]
28
29/// Tonic-generated bindings for the `pcx.v1` proto package.
30///
31/// Equivalent to `include!(concat!(env!("OUT_DIR"), "/pcx.v1.rs"))` —
32/// see `proto/pcx.proto` for the source schema.
33#[allow(clippy::all, missing_docs)]
34pub mod pb {
35 tonic::include_proto!("pcx.v1");
36}
37
38// Top-level re-exports of the most commonly-used wire types so the rest of
39// the workspace can write `post_cortex_proto::FreshnessEntry` instead of
40// `post_cortex_proto::pb::FreshnessEntry`. Matches the names that used to
41// live under `crate::daemon::grpc_service::pb` in the legacy single-crate
42// layout — this is the migration that unblocks the Phase 3 core split.
43pub use pb::{CascadeInvalidateReport, FreshnessEntry, FreshnessStatus, SourceReference, SymbolId};