Commit Graph
12 Commits
Author SHA1 Message Date
jif f05aa41da6 Route message-board notifications through agent mailboxes (#59139)
## Why

Board notifications were skipped when recipients had no active turn accepting mailbox delivery. Queue them through the ordinary agent-message path so idle recipients can receive them in a later turn.

## What changed

- Submit board notices as `Op::InterAgentCommunication` with `trigger_turn` disabled, preserving normal mailbox scheduling without reopening finalized answers.
- Hold a residency guard through dispatch of submitted agent messages to coordinate delivery with agent eviction.
- Update board tool descriptions to describe the host's notification queueing and wake policy.

## Testing

Update local and HTTP board scenarios to cover queued idle notices, delivery after a finalized answer, and mailbox delivery before a pending tool call. Extend residency coverage to verify that submission waits for the eviction gate and queued messages survive eviction.

GitOrigin-RevId: a77137fc40932f5903852e14742483844e07c9bc
2026-11-03 12:33:26 +00:00
Dmitriy Kovalenko 3f958ac2fe Run Bazel CI locally without BuildBuddy credentials (#59055)
## What changed

- Remove automatic BuildBuddy configuration and credential forwarding from Bazel CI, release, SDK, and voice builds. Strip remote execution CI configs in the shared wrapper while retaining explicit remote configurations for local use.
- Use native Windows host tools and audio dependencies for Windows Bazel actions, forwarding the required toolchain and environment settings.
- Initialize message-board MCP servers through a per-session `OnceCell` so server startup does not hold the shared registry lock across an await.
- Expose the message-board test helper to the core Bazel package and update the runtime-auth test call for the `reauth` argument.

GitOrigin-RevId: 5d5c1f4d71fa841090dea8eec8006380981fb65b
2026-11-03 04:08:59 +00:00
felixxia-oai 43ad1cbf30 Delete Guardian evidence boards when permanently deleting threads (#58955)
## What changed

Register Guardian evidence-board cleanup with the app server's thread store when Guardian V3 is enabled. Leave Guardian storage untouched when the feature is disabled, and report cleanup failures as thread-store errors.

## Testing

Extend deletion tests to cover feature gating, preservation of unrelated boards and a surviving main thread's board, and corrupt-database recovery. Expand message-board tests to verify namespace isolation and persistent deletion markers that prevent later writes.

GitOrigin-RevId: d9119d22607769c92448d0f3cacbbfd03fbdf943
2026-11-02 19:26:15 +00:00
jif 6c4fa86838 Add an in-memory launcher for the message-board MCP server (#58909)
## What changed

Expose `launch_in_memory()` and `LocalServer` to run a loopback HTTP endpoint with generated bearer credentials. Runners register a shared in-memory board per session through `add_board(session_id, host)`, using `MessageBoardHost` for membership, clocks, and notifications without a SQLite registry.

The handle exposes the endpoint and authorization header for MCP configuration, including plugin endpoint overrides. Dropping it cancels HTTP and MCP sessions; `shutdown().await` also waits for completion.

## Testing

Extend the parent/child HTTP integration scenario to cover the in-memory launcher, plugin endpoint overrides, host-provided timestamps, authentication and invalid identity rejection, and operation without creating a SQLite board database.

GitOrigin-RevId: e1cae295724a35f4eded290ba8a4e19926b98c13
2026-11-02 15:29:45 +00:00
jif 18c6dbe52b Add a standalone HTTP MCP server for the agent message board (#58904)
## What changed

- Add `codex-message-board-mcp` to serve discussion tools at `/mcp` through ordinary MCP configuration, backed by the existing SQLite board and a read-only Codex registry.
- Require bearer authentication and validate `threadId` and `sessionId` metadata against persisted agent membership. Support additional allowed HTTP hosts with `--allowed-host`.
- Expose a reusable `serve_http` library entry point and scope retry deduplication to the caller within an MCP session.

## Testing

Add integration coverage for a child posting and its restarted parent reading the persisted board, including reads while a database writer lock is held. Cover invalid tokens, disallowed hosts, missing caller metadata, invalid membership, and startup without an existing registry.

GitOrigin-RevId: 5e3d71eaaf120169e2585acd0b5f84df1b402f00
2026-11-02 15:09:22 +00:00
jif a9e474c8fc Add an MCP adapter for message-board tools (#58341)
## What changed

Add `codex-message-board-mcp` with a `MessageBoardMcpServer` that exposes selected message-board tools through `rmcp::ServerHandler`. Reuse the existing tool schemas, validation, permission checks, output budgets, and storage behavior.

Bind the board connection and caller identity when constructing the adapter, leaving authentication and transport setup to the host. Return JSON text with matching structured content for object results, map validation and permission failures to MCP tool errors, and report unknown tools as protocol errors.

Scope request deduplication to each MCP session so reused JSON-RPC IDs on new connections do not collide with earlier posts. Preserve the distinction between numeric and string request IDs.

## Testing

Add integration tests for tool discovery, bounded results, caller identity validation, unknown tools, request deduplication within and across sessions, and read-only permission denials. Exercise discovery and calls against both local and in-memory boards.

GitOrigin-RevId: 6c62c340b24198a00d0d3d0487cb2ebc5c397b06
2026-10-30 13:33:02 +00:00
felixxia-oai 2839ed763b Add paginated channel subscription queries to the local message board (#56495)
## What changed

Add `LocalAgentMessageBoard::subscribed_channels` to list the caller's subscribed channel names on the current board in name order, using the existing `PageRequest` limits and cursors.

## Testing

Extend the local board test to verify that a read-only connection can retrieve two subscribed channels across successive one-item pages, with no cursor after the final page.

GitOrigin-RevId: 63f2e3e7caad9638e5e0f4f38aaf722a590c5d7f
2026-10-23 15:00:06 +00:00
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
felixxia-oai b719a7fb7f Add silent append support to message boards (#56461)
## Why

Recording evidence on a message board needs a write operation that does not automatically subscribe the author or notify existing subscribers.

## What changed

- Add `AppendRequest` and `AgentMessageBoard::append` for local and in-memory boards, supporting new channels, existing channels, and thread replies without subscription or notification side effects.
- Expose an explicitly selected `append` tool that accepts a destination and text, with no notification recipients.
- Share caller-scoped request IDs with `post`: identical retries return the original metadata, while changes to the payload or operation are rejected. Local appends retain write permission checks and durable storage.
- Reject remote appends as unsupported without issuing an HTTP request.

## Testing

Add coverage for silent writes on both supported backends, tool argument validation and retry conflicts, local read-only access and retries after reopening storage, and remote rejection without network requests.

GitOrigin-RevId: 01fb9d3e2cfcb3de362b28f2bf2ee83bafada80d
2026-10-23 12:18:18 +00:00
felixxia-oai 8d06d62e15 Allow consumers to select message-board tools (#55973)
## Why

`message_board_tools` always exposed all nine discussion tools. Consumers need a way to expose a subset, such as `read_thread` and `list_threads`, over the same board.

## What changed

Accept an ordered slice of the new `MessageBoardTool` enum and optional description overrides in `message_board_tools`. Use the enum for schemas and dispatch, and keep the agent extension's existing tool set and order through `MessageBoardTool::DISCUSSION`.

## Testing

Extend the local-board integration test to verify that a reader-only selection exposes exactly the requested tools in the supplied order and reads the existing discussion.

GitOrigin-RevId: 60026d73768330ff4b694c3a9e99480e3ed7af27
2026-10-21 19:37:29 +00:00
felixxia-oai e41e882174 Add storage namespaces for local message boards (#55971)
## Why

Local message boards use a fixed database filename. Callers need separate storage for boards that share a session identity.

## What changed

- Add `LocalBoardOptions` with a validated `storage_namespace`, and support it when opening, configuring, and permanently deleting boards.
- Allow `LocalBoard::with_options` to select storage for its connections.
- Store custom namespaces in `message_board_<namespace>_1.sqlite`, while preserving `agent_message_board_1.sqlite` for the default namespace.
- Have the agent message board extension select the same namespace for opening, setup, and deletion.

## Testing

Add coverage for namespace isolation, reopening saved posts, and avoiding collisions with other runtime databases. Update setup tests to exercise a custom namespace through reopening and deletion.

GitOrigin-RevId: a6ea8d171809625edeedc3a8ac3ee2e1bbf1682a
2026-10-21 19:36:20 +00:00
felixxia-oai a47d1338c1 Extract shared message-board code into codex-message-board (#55970)
## What changed

Move the message-board API, types, permissions, storage backends, and tool implementations into the new `codex-message-board` crate. Keep extension registration in `codex-agent-message-board-extension`, and update core and the remote client to use the shared crate directly.

Move the existing board tests with the implementation and add the crate to the Cargo workspace and Bazel build.

GitOrigin-RevId: 33ce527c2bef7f862eba55cb9b32222902ccf4ad
2026-10-21 19:34:51 +00:00