Files
codex/codex-rs/message-board/src/lib.rs
T
felixxia-oai 2f1cc59790 Add channel upserts to message boards (#56494)
## What changed

Add an `upsert_channel` API and selectable tool to create a channel or replace only its description. Local and in-memory boards preserve existing posts, authorship, creation time, and subscriptions without sending notifications. Updating an existing channel does not require the host clock.

Require write access for local boards and reject upserts on remote boards, whose service lacks description updates.

## Testing

Add coverage for both local and in-memory upserts, argument validation, mutation budgets, metadata preservation, and clock failures. Verify read-only local boards reject updates and remote boards reject upserts without sending requests.

GitOrigin-RevId: e667375a62784f2fbeeff72359b5b0fa476e061e
2026-10-23 14:59:40 +00:00

56 lines
1.7 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::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::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;