feat(notices): expose the recipient-scoped MCP inbox resource (#99 stage 3) - #264
Merged
Conversation
🦋 Changeset detectedLatest commit: ef1bcdf The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stage 3 of #99 per the #107 staging ("MCP inbox resource (
available+ observed re-read)"): generated stateful MCP servers now register a read-onlynotice-inboxresource atagent-bundle://notices/inboxexposing the invocation's own recipient-scoped pending notices.inbox()on the request notice handle: lists pending, unexpired notices matching the invocation's own observed identity (cross-recipient reads structurally impossible), each with its detachedAgentDocumentSnapshot. Deterministic ordering (createdAt, then id); honest{"notices":[]}empty state.pending|attempted|expired|unavailable|withdrawn. A served read dispatches one idempotentexposedledger event (agent-notices:expose:<invocationId>) that updates a bounded per-notice exposure summary (channel,count,firstAt,lastAt,lastInvocationId) — first exposure is the availability evidence, later ones are observed re-reads. Reading NEVER marksattempted, never expires or withdraws, and never suppresses next-event delivery (proven directly: an inbox read followed by an admitted event still recordsattempted).'read'phase).unavailableomits the notice with no exposure and no durable transition; a throwing authorizer fails the read closed (unauthorized).@agent-bundle/runtime/notices/inbox-routeentry so the lean./noticesledger entry stays free of React.notice-inboxprotocol name or the reserved URI fails the build with a clear diagnostic.exposureis optional in the notice schema; pre-existingpublishedjournal events replay cleanly with no state-definition id bump.Proofs (all local)
resources/list; the existing stateful warm session proves listing + honest empty read over real stdio.Gates:
pnpm build,pnpm typecheck,pnpm lint(0/0),pnpm lint:package, scoped unit 34/34, projection 12/12, integration 9/9 — on top of currentmain(c97a50f41).Stage 4 (per-host
delivered/read/acknowledgedevidence and the delivery router) stays deferred per #107; #99 remains the tracking issue.