Files
codex/codex-rs/message-board/src/lib.rs
T
felixxia-oai 8d0098930e Add subscription tools for Guardian reviewers (#59995)
## What changed

Add `ReviewerSubscriptions` to capture a Guardian catalog and expose self-only `subscribe` and `unsubscribe` tools. Restrict requests to channels in that catalog and return captured post IDs so later evidence stays outside the review boundary. Read current membership from storage and filter it through the captured catalog.

Share message-board tool size limits and query the latest channel post directly when updating subscriptions.

## Testing

Add coverage for caller-only subscription changes, rejection of later channels and explicit agent targets, captured post IDs, and unchanged subscriptions for other agents. Extend message-board tests to check unsubscribe post IDs and reject missing channels.

GitOrigin-RevId: 48bf4270d6079f7e436096175c67bb211ccbc248
2026-11-06 21:55:20 +00:00

59 lines
1.8 KiB
Rust

//! Shared message-board operations with interchangeable local, in-memory and remote backends.
//!
//! Board identity and caller identity come from the host. Implementations own
//! storage and notification fanout. Shared tools are registered by consumers.
mod api;
mod host;
mod in_memory;
mod local;
mod permissions;
mod tools;
mod types;
pub use api::AgentMessageBoard;
pub use api::AppendRequest;
pub use api::ChannelDescription;
pub use api::ChannelQuery;
pub use api::CreateChannelRequest;
pub use api::PageRequest;
pub use api::PostDestination;
pub use api::PostQuery;
pub use api::PostRequest;
pub use api::ReadPostRequest;
pub use api::ReadThreadRequest;
pub use api::SortDirection;
pub use api::SubscriptionChange;
pub use api::SubscriptionRequest;
pub use api::SubscriptionTarget;
pub use api::ThreadQuery;
pub use api::ThreadSort;
pub use api::UpsertChannelRequest;
pub use host::MessageBoardHost;
pub use host::NotificationDelivery;
pub use in_memory::InMemoryAgentMessageBoard;
pub use in_memory::InMemoryMessageBoards;
pub use local::LocalAgentMessageBoard;
pub use local::catalog::LocalBoardReadView;
pub use local::connection::LocalBoard;
pub use local::connection::LocalBoardConnection;
pub use local::options::LocalBoardOptions;
pub use local::setup::LocalBoardSetup;
pub use local::setup::configure_local_board;
pub use permissions::BoardPermissions;
pub use permissions::ChannelPermissions;
pub use permissions::PermissionDenied;
pub use tools::MAX_TOOL_ARGUMENT_KIB;
pub use tools::MAX_TOOL_RESPONSE_BYTES;
pub use tools::message_board_tools;
pub use tools::selection::MessageBoardTool;
pub use types::ChannelPage;
pub use types::ChannelSummary;
pub use types::Page;
pub use types::PostContent;
pub use types::PostMetadata;
pub use types::PostPreview;
pub use types::SubscriptionState;
pub use types::ThreadPage;
pub use types::ThreadSummary;